- GATE CS
- 2026–27 pattern practice
- Operating Systems
- Virtual memory
- Medium
Using FIFO replacement with 3 frames (initially empty), how many page faults occur for the reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5?
Memory Management
Pick an option to check your answer.
Answer: D. Solution
Simulating FIFO: 1, 2, 3 fault (3); 4 replaces 1 (4); 1 replaces 2 (5); 2 replaces 3 (6); 5 replaces 4 (7); 1 and 2 hit; 3 replaces 1 (8); 4 replaces 2 (9); 5 hits. Total 9. (With 4 frames, the same string gives 10 — Belady's anomaly.)
Why not the others
- 10 is the 4-frame count.
- 8 misses one fault.
- 7 would be closer to the optimal (OPT) policy.