Lab 15 - Optimal Page Replacement Algo
Lab 15 - Optimal Page Replacement Algo
Now for the further page reference string —> 0 Page fault because they are already
available in the memory.
Optimal page replacement is perfect, but not possible in practice as the operating
system cannot know future requests. The use of Optimal Page replacement is to set up
a benchmark so that other replacement algorithms can be analyzed against it.
Advantages
1. Complexity is less and easy to implement.
2. Assistance needed is low i.e Data Structure used are easy and light.
Disadvantages
1. OPR is perfect, but not possible in practice as the operating system
cannot know future requests.
2. Error handling is tough
Lab Assignment:
Implement the Optimal Page replacement algorithm. Input should be number of free
frames and a reference string. The output should be number of page faults (miss) and
Hits. Also, show the status of frames allocation to pages after each page is referred.