Least Recently Used (LRU):


LRU page replacement links with all pages the time of that page’s last use. At the point when a page must be replaced with LRU page replacement picks the page that has not been utilized for the longest time frame. We can think about this technique as the optimal page-replacement algorithm glancing in reverse in time, as opposed to advance.


In Least Recently Used (LRU) algorithm is a Greedy algorithm where the page to be replaced is least recently used. The idea is based on locality of reference, the least recently used page is not likely.




Example:

Consider the page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2 with 4 page frames.Find number of page faults.


Advantage:


Disadvantage: