CS FundamentalsHardAccenture · Capgemini technical pattern

Reference string: 1, 3, 0, 3, 5, 6, 3, 1, 0, 6, 5, 3. With 3 frames, initially empty, how many page faults does the Optimal (Belady’s MIN) algorithm cause?

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

Correct answer: B. 7

1, 3, 0 fault (3). At 5 evict 0 (used farthest ahead) → 4. At 6 evict 5 → 5. 3 and 1 hit. At 0 evict 1 (never used again) → 6. 6 hits. At 5 evict 0 or 6 → 7. 3 hits. Total 7; FIFO gives 11.

More Operating Systems questions

Exams that ask this topic