CS FundamentalsHardGATE CS

Reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5. How many faults does LRU give with 3 frames and with 4 frames (initially empty)?

  1. A. 10 and 8
  2. B. 9 and 10
  3. C. 8 and 10
  4. D. 10 and 10

Correct answer: A. 10 and 8

LRU gives 10 and 8: as a stack algorithm it never gets worse with more frames. On the same string FIFO gives 9 and 10, the classic Belady anomaly.

More Operating Systems questions

Exams that ask this topic