CS FundamentalsModerateWipro · Cognizant pattern

Reference string: 3, 1, 4, 3, 2, 1, 5, 3, 4, 1, 2, 5, 4. With 3 frames, initially empty, how many page faults does FIFO produce?

  1. A. 12
  2. B. 7
  3. C. 5
  4. D. 11

Correct answer: D. 11

Faults on 3, 1, 4 (cold), then 2 (evict 3), 1 is a hit, 5 (evict 1), 3 (evict 4), 4 (evict 2), 1 (evict 5), 2 (evict 3), 5 (evict 4), 4 (evict 1). Only references 3 (4th) and 1 (6th) hit, so 11 faults. LRU would give 12, OPT 7, and 5 counts only the cold misses.

More Operating Systems questions

Exams that ask this topic