Programming Question

In this project, you will use what you have studied in the chapter

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

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

2

>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:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
  • 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

2

End

4436Sleep

52

Sleep

6636Sleep7726Sleep
11 7 End
22 3 8 Sleep
33 4 6
5 9

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

88

Sleep

9955Sleep

10

Sleep

111146End

1265Sleep

2

36End

41334Sleep131353End71323End9

44Sleep

10

1End

61936End520210Sleep421312Sleep1222613End82239End928511End53323Sleep434310End5

210End

34
10 28
12
13
17
19 21
38

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.

Grading Rubric

Your project will be graded based on the following rubric:

CategoryUnacceptable (0-1)Needs Improvement (2-3)Good (4)Excellent (5)Total Possible Points

10

10

5

5

5

5

Efficiency of solutions (x2) Solutions require long unnecessary waiting times for the processes and not using the complete memory space Solutions either require long unnecessary waiting times for the processes or not using the complete memory space Solutions are making acceptable use of memory on both temporal and spatial levels Solutions lead to an optimal temporal and spatial use of memory
Analysis (x2) Not able to explain choices or results Basic understanding of memory management but needs to be improved on the analysis level Adequate explanation and analysis for memory state scenario choice Clear explanation and clarification of the choices for scenarios and results
Trying different scenarios (x1) No Scenarios tested Only one scenario is tested Tests of only 2 different scenarios Tests of 3 different scenarios
Use of functions for each memory management task (x1) No use of any of the three function types (allocation, deallocation and replacement) Use of only one of the three function types (allocation, deallocation and replacement) Use of only two of the three function types (allocation, deallocation and replacement) Use of all function types for allocation, deallocation and replacement
Correct matching between the chosen scenario and functions (x1) Chosen methods do not match the planned scenario Some of the chosen methods match the planned scenario Majority of the chosen methods match the planned scenario All chosen methods match the planned scenario
Completeness and correctness of the test case (x1) Less than half the timing and memory spatial constraints of the assignment (task starting times, sizes and intervals) where implemented More than half the timing and memory spatial constraints of the assignment (task starting times, sizes and intervals) where followed Most of the timing and memory spatial constraints of the assignment (task starting times, sizes and intervals) where followed All the timing and memory spatial constraints of the assignment (task starting times, sizes and intervals) where fully followed

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER