In this lab, you will use the functions and programs developed in Labs 6 - 8 for simulating memory management function under different conditions. The aim is to analyse the numbers of page faults under these conditions.
Set the physical memory size to 32 frames. Create four processes with page sizes of 4, 4, 8 and 16 respectively. Their sigma values are 1, 5, 4 and 2 respectively.
Initialise the process queue randomly and let the memory manager
do its job. At the end print the physical memory contents and
also the sequence in which the processes finished their
execution.
Repeat the experiment above with different process settings but
making sure that the total number of pages does not exceed 32.
Write your comments about the sequences in which processes begin
execution and the sequence in which they finished.
Let the number of frames be 32. Create 6 processes with a total
memory size of 36 - 40 pages. Run the programs through the memory
mapper and print the number of page faults for each process and
also the total number. Repeat the experiment with the same parameters
4 times, and then print the average values of page faults.
Also, print the sequences in which the processes begin their
execution and end their execution. Again, try to analyse and
understand the numbers that you get. Do they make sense from your
understanding of virtual memory and page replacement algorithms?
Repeat the above experiment with physical frames set to 16. The memory requirement of the processes is now more than double the size of the physical memory. Again, study what happens to the number of page faults.