CS FundamentalsVery hardGATE CS (PYQ pattern)

A system uses the clock (second-chance) page replacement with 4 frames. Initially all frames are empty; a page has its reference bit set to 1 when loaded and when hit. The hand advances past the frame it just filled. Reference string: 2 5 4 4 3 5 6 6 5 3 5 2 3 5 1 3. How many page faults occur?

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

Correct answer: B. 8

Simulating the clock hand with reference bits gives 8 faults. For comparison on the same string OPT gives 6, LRU 7 and FIFO 9, so the clock result lies between LRU and FIFO.

More Operating Systems questions

Exams that ask this topic