CS FundamentalsVery hardGATE CS (PYQ pattern)

Reference string: 8, 6, 5, 3, 3, 1, 6, 8, 2, 6, 1, 7, 3, 8, 7, 3, 3, 4, 1, 2, 3, 2, 7, 2, 5, 4, 4, 7, 2, 5. What is the smallest number of frames for which LRU incurs at most 14 page faults (memory initially empty)?

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

Correct answer: B. 5

LRU is a stack algorithm, so faults never rise with more frames. Fault counts for 1 to 8 frames are [27, 25, 22, 16, 13, 10, 9, 8]; the first value <= 14 appears at 5 frames.

More Operating Systems questions

Exams that ask this topic