CS FundamentalsVery hardGATE CS

For the reference string 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, going from 3 frames to 4 frames changes the FIFO fault count from 13 to how many, and LRU from 13 to how many?

  1. A. FIFO 13, LRU 12
  2. B. FIFO 12, LRU 12
  3. C. FIFO 14, LRU 12
  4. D. FIFO 12, LRU 11

Correct answer: A. FIFO 13, LRU 12

With 4 frames FIFO still faults 13 times (no gain, though no Belady anomaly either) while LRU drops to 12. As a stack algorithm LRU can never get worse with more frames; FIFO can stay the same or even rise.

More Operating Systems questions

Exams that ask this topic