Optimal Page Replacement Algorithm
Page
replacement algorithm are needed to decide which page to be replaced when new page
comes in main memory. Page Fault – A page
fault occurs when a program attempts to access a block of memory that is
not stored in the physical memory, or RAM. Different page replacement
algorithms are: FIFO, LRU, Optimal. The target for all algorithms
is to reduce number of page faults.
If there is new page arrives and page frame has empty slots. Then page will be store directly in page frame. If referred page is already present, increment hit count. If not present, find if a page that is never referenced in future. If such a page exists, replace this page with new page. If no such page exists, find a page that is referenced farthest in future. Replace this page with new page. This algorithm results in fewest number of page faults. But this algorithm is impossible to implement.
To learn more about Optimal Page Replacement Algorithm, watch below video
Watch more videos click here.
No comments:
Post a Comment