The GATE Grind

GATE 2014 CS (CS2) – Question 43

Operating System · Memory Management and Virtual Memory · 2 marks · Multiple choice

Twenty page frames initially contain pages 101–120. A program accesses 1,2,…,100 in order, repeating this sequence thrice. Which replacement policy has the same page-fault count as optimal replacement?

  1. Least recently used
  2. First in first out
  3. Last in first out
  4. Most recently used

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (D) Most recently used

Explanation

During an ascending scan, the most recently referenced page is the one whose next use is farthest away, apart from pages never used again. Replacing that page preserves earlier pages for the next scan, matching optimal faults for this cyclic access pattern. Thus **MRU,D**. LRU and FIFO instead evict pages needed earlier on the next pass.