CS FundamentalsHardWipro · Cognizant technical pattern

Reference string: 5, 2, 5, 8, 2, 3, 5, 9, 8, 2, 3, 5. With 3 frames, initially empty, how many page faults does LRU replacement cause?

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

Correct answer: A. 10

Hits occur only at the 3rd reference (5) and 5th (2); after that each page returns just after being the least recently used: faults at 5, 2, 8, 3, 5, 9, 8, 2, 3, 5 = 10. Optimal would need 7.

More Operating Systems questions

Exams that ask this topic