CS FundamentalsHardGATE CS

A loop references pages 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4 with 3 frames, initially empty. How many faults occur under FIFO, LRU and OPT?

  1. A. 12, 12, 8
  2. B. 12, 9, 6
  3. C. 9, 12, 6
  4. D. 12, 12, 6

Correct answer: D. 12, 12, 6

A cyclic loop one page larger than memory defeats FIFO and LRU: each evicts exactly the page needed next, so all 12 references fault. OPT evicts the page used farthest ahead and faults only 6 times (4 cold plus 2).

More Operating Systems questions

Exams that ask this topic