CS FundamentalsVery hardGATE CS (PYQ pattern)

With 3 frames, initially empty, the reference string is 4, 2, 1, 5, 2, 1, 3, 2, 4, 3, 1, 3, 2, 2, 5, 4, 5, 1, 3, 2, 4, 4. How many MORE page faults does LRU incur than the optimal (Belady) policy?

  1. A. 5
  2. B. 3
  3. C. 6
  4. D. 4

Correct answer: D. 4

LRU gives 14 faults and OPT 10, a difference of 4 (FIFO gives 16, so FIFO - OPT = 6 is the trap).

More Operating Systems questions

Exams that ask this topic