CS FundamentalsVery hardGATE CS (PYQ pattern)

LFU replacement with 3 frames (initially empty): the victim is the resident page with the smallest reference count since it was loaded, ties broken in favour of evicting the page loaded EARLIEST; counts restart at 1 when a page is reloaded. Reference string: 4, 5, 2, 1, 2, 1, 2, 2, 3, 3, 1, 5, 5, 3, 1, 3, 5, 3, 5, 1. How many page faults occur?

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

Correct answer: B. 10

LFU yields 10 faults; LRU on the same string would give 6 (LFU keeps old frequently used pages that are no longer needed).

More Operating Systems questions

Exams that ask this topic