Bird
Raised Fist0

A system uses FIFO page replacement with 2 frames and the reference string: 1, 2, 3, 2, 1, 4. How many page faults occur?

medium🧠🧾 Concept Trace Q4 of Q15
Operating Systems - Page Replacement - FIFO, LRU, Optimal Algorithm
A system uses FIFO page replacement with 2 frames and the reference string: 1, 2, 3, 2, 1, 4. How many page faults occur?
A4 page faults
B3 page faults
C6 page faults
D5 page faults
Step-by-Step Solution
Solution:
  1. Step 1: Trace FIFO faults

    Frames empty initially. Insert 1 (fault 1), 2 (fault 2). Next 3 replaces 1 (fault 3). Next 2 is hit. Next 1 replaces 2 (fault 4). Next 4 replaces 3 (fault 5). Total faults = 5.
  2. Final Answer:

    Option D -> Option D
  3. Quick Check:

    FIFO evicts oldest, counting faults carefully [OK]
Quick Trick: FIFO evicts oldest, count faults on misses [OK]
Common Mistakes:
MISTAKES
  • Counting hits as faults
  • Misordering eviction sequence
  • Off-by-one counting errors
Trap Explanation:
PITFALL
  • Candidates often misapply FIFO eviction order or confuse hits with faults.
Interviewer Note:
CONTEXT
  • Verbal tracing of FIFO eviction and fault counting.
Master "Page Replacement - FIFO, LRU, Optimal Algorithm" in Operating Systems

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Operating Systems Quizzes