Programming

In this project, you will use what you have studied in the chapter Memory Management & Operating Systems to emulate how operating systems manage memory paging, allocation, deallocation and replacement. Upon completion of this project you will be able to:

  • Describe how operating systems manage memory
  • Use simple codes to emulate basic functionalities of operating systems

Prompt

1) Show the memory state for the different scenarios in the tables below and analyze which choice is the best. Discuss the impact that Linux versus Windows might have on the ending memory state.

2) With that information in mind, run the following list of jobs:

  • An interval is the number of seconds
  • Total Memory size = 20 Kbyte
  • Page size = 1 Kbyte
Job IDStart TimeJob required sizeExecution intervalJob state at the end of the interval
1127End
2238Sleep
3346End
4436Sleep
5529Sleep
6636Sleep
7726Sleep

3) Run three different scenarios in order to manage memory allocation

Run the program for the following scenarios:

  • Best-Fit
  • First-Fit
  • Worst-Fit

Each should be run for the following jobs:

Job IDStart TimeJob required sizeExecution intervalJob state at the end of the interval
8834Sleep
9955Sleep
101028Sleep
111146End
121265Sleep
21336End
41334Sleep
131353End
71323End
91744Sleep
1019211End
61936End
520210Sleep
421312Sleep
1222613End
82239End
928511End
53323Sleep
434310End
538210End

Prompt Tips

Here are a couple tips for getting started with the assignment:

  • You’ll want to write a program that will simulate the process an operating system follows when cycling jobs to make sure they are all completed quickly. C++ is a language that works well, but you can choose the language you prefer.
  • Copy the data in the two tables from the prompt into a text file that you can use as input for a program.
  • Write a program using Java, C++, Python, or the programming language of your choice that can take the input from your text file.
  • In the same program, write a function that will queue up each job along with its start time, job size, execution interval, and state at the end of each interval.
  • Continue building on this program so that you can execute each of these jobs according to their individual interval.
  • Have this program return the state of each job at the end of each interval.
  • Run the program until all jobs are complete.

You will need to use what you learned about allocation, deallocation, and replacement to build this program, and you’ll need to consider the total memory size and page size defined in the prompt. When asked to consider different scenarios, it means to consider running these jobs using the best-fit allocation scheme, the first-fit scheme, or others, and then determine which would be best.

Click here to order similar paper @Udessaywriters.com.100% Original.Written from scratch by professional writers.

You May Also Like

About the Author: admin