CS FundamentalsVery hardGATE CS

Reference string: 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3 with 3 frames, initially empty. How many page faults occur under FIFO, LRU and OPT respectively?

  1. A. 13, 12, 10
  2. B. 12, 13, 10
  3. C. 13, 13, 11
  4. D. 13, 13, 10

Correct answer: D. 13, 13, 10

Simulating gives 13 faults for FIFO and also 13 for LRU (only the repeated 1, 5, 5 and 9 hit under LRU), while OPT faults 10 times. LRU is not guaranteed to beat FIFO on a particular string.

More Operating Systems questions

Exams that ask this topic