Least Recently Used (LRU) Page Replacement Algorithm in Operating Systems (OS)

Least Recently Used (LRU) Page Replacement Algorithm in Operating Systems (OS)?

LRU Page Replacement Algorithm works on a prediction that the pages that have been used more times in the last few instructions will probably be used again and again.

Least Recently Used algorithm page replacement operating systems OS
Figure: Least Recently Used algorithm page replacement operating systems OS

PF stands for the page fault.  Read More  FH is used in the table to represent the page hit. Read More Read More 

1st column: First of all, all memory is free.

2nd column: Page 4 is loaded on memory. The page fault occurs because page 4 is already not on memory.

3rd column: Page 6 is loaded on memory. The page fault occurs.

4th column: Page 8 is loaded on memory. The page fault occurs.

5th column: Page 4 is already loaded on memory. Page Hit occurs.

6th column: Page 2 is loaded on memory. The page fault occurs.

7th column: Page 6 is loaded on memory. The page fault  Read More  occurs.

Fazal Rehman Shamil
Welcome to all friends. The reason for our success is only your love for T4Tutorials. Our team is always available to answer your queries regarding any kind of confusions or discussion regarding your study and career matters. For discussion with us please join our facebook group "T4Tutorials.com". The link of the group is mentioned below. Thanks and love to all for connecting with us. We are nothing without you. Love you all.....
https://web.facebook.com/groups/2066136233601097/