CS FundamentalsVery hardGATE CS

A process references pages in a loop over 5 distinct pages: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ... with 4 frames. Which policy performs best in the steady state, and roughly what fraction of references fault?

  1. A. LRU, with no faults after warm-up
  2. B. FIFO, faulting on half the references
  3. C. All three fault on every reference
  4. D. MRU (evict the most recently used page) faults on only about 1 in 4 references; LRU and FIFO fault on every reference

Correct answer: D. MRU (evict the most recently used page) faults on only about 1 in 4 references; LRU and FIFO fault on every reference

A cyclic pattern one page larger than memory is LRU's worst case: the evicted page is always the next one needed. MRU keeps most of the loop resident; each fault displaces the page just used, which is needed furthest in the future.

More Operating Systems questions

Exams that ask this topic