for hunain60 only
You are to write a program that takes a reference string and the number
of frames as inputs to simulate page replacement algorithms.
Suppose the maximum length of a reference string is 30 and there are 5 diffent
numbers of pages. Randomly generate a reference string, e.g. 2 1 3 4 5 2 3 ...
Take the number of frames as an input. Find out the different number of page faults
using the Optimal and LRU algorithms. If there is a tie, use FIFO algorithm to break
the tie. Print out the page replacement process and you can see how LRU differs from the optimal
Please Login or Register
to Submit the Solution for the Request