GATE 2012 CS (CS1) – Question 52
With three initially empty frames, reference string is 1,2,3,2,4,1,3,2,4,1. Let LRU,FIFO,OPTIMAL be fault counts. Which relation holds?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) OPTIMAL < FIFO < LRU
Explanation
Simulating the reference string gives optimal faults at positions 1,2,3,5,8 (five total), FIFO faults at 1,2,3,5,6,8 (six), and LRU faults at every position except the repeated two at position four (nine). Thus OPTIMAL<FIFO<LRU, option B. FIFO replacement follows arrival order rather than most recent use.