CS FundamentalsModerateGATE CS

Why is pure LRU rarely implemented exactly in hardware, and what is used instead?

  1. A. LRU suffers from Belady's anomaly
  2. B. Updating a timestamp or stack on every memory reference is too expensive; approximations using reference bits (clock, aging) are used
  3. C. LRU needs knowledge of future references
  4. D. LRU requires the dirty bit

Correct answer: B. Updating a timestamp or stack on every memory reference is too expensive; approximations using reference bits (clock, aging) are used

Exact LRU would need an update on each access. Reference bits sampled by the OS (second chance, aging counters) approximate recency cheaply. OPT is the algorithm needing the future.

More Operating Systems questions

Exams that ask this topic