Page Replacement

It is a technique of replacing a data block (frame) of Main Memory with the data block (page) of Secondary Memory when all the frames of Main Memory are occupied and CPU demands for the data block which is not available inside Main Memory, technically, when Page Fault occurs.

Example:

Consider a Main Memory with a number of frames = 4 and the following are the data block access requests made by the CPU.

CPU Requests – 7, 0, 1 , 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1

Given, the number of frames = 4. Initially, all are empty

Most Frequently Used (MFU) Algorithm in Operating System

MFU Algorithm is a Page Replacement Algorithm in the Operating System that replaces the page accessed a maximum number of times in the past. If more than one page is accessed the same number of times, then the page which occupied the frame first will be replaced.

Similar Reads

Page Replacement

It is a technique of replacing a data block (frame) of Main Memory with the data block (page) of Secondary Memory when all the frames of Main Memory are occupied and CPU demands for the data block which is not available inside Main Memory, technically, when Page Fault occurs....

Page Replacement Using the Most Frequently Used (MFU) Algorithm

(i) The 4 frames are initially empty, the first 4 blocks occupy them....

Conclusion

All the data block access requests made by CPU are completed using Most Frequently Used (MFU) Algorithm. In this algorithm, as most frequently accessed page is replaced, this increases the number of Page Faults. Number of Page Faults for above example are 5+4 = 9 page faults....

Frequently Asked Questions

Q.1: What is a data block in Operating System?...