Discussion
The Least Recently Used (LRU) page replacement algorithm evicts
Answer: D
Correct answer: the page that has not been used for the longest time
LRU evicts the page whose most recent use lies furthest in the past, on the reasoning that a page unused for a long time is unlikely to be needed soon - the principle of temporal locality. It approximates the theoretical optimal algorithm, the third option, which evicts the page that will next be needed furthest in the future. That is unimplementable, since it requires knowledge of the future, but it is used as a benchmark against which real algorithms are measured. FIFO, the second option, evicts the oldest-loaded page and is simple but poor, and it suffers Belady’s anomaly: adding more frames can increase the number of page faults, which is deeply counter-intuitive. LRU belongs to the class of stack algorithms and cannot exhibit it. True LRU is expensive to implement, needing a timestamp or a stack updated on every reference, so real systems approximate it with reference bits - the clock or second-chance algorithm being the usual method.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development