Least Recently Used –
In this algorithm page will be replaced which is least recently used.
1).now 1 is already in memory so 1 hit
2.)now 2 is already in memory so 2 hit
3.)now 4 is not in memory so miss-FIRST page faults
4.)now 5 is not in memory so miss according to LRU we replace with 1-SECOND page faults
5.)now 2 is already in memory so hit
6.)now 1 is not in memory so miss and we replace with 4 number page accordingly LRU-THIRD page faults
7.)now 2 is already in memory so 2 hit
8.)now 4 is not in memory so miss according to LRU we replace with 5-FOURTH page faults
total number of page faults = 4