Bird
Raised Fist0

Consider a system using LRU page replacement with 3 frames and the reference string: 7, 0, 1, 2, 0, 3, 0. How many page faults occur?

easy🧠🧾 Concept Trace Q3 of Q15
Operating Systems - Page Replacement - FIFO, LRU, Optimal Algorithm
Consider a system using LRU page replacement with 3 frames and the reference string: 7, 0, 1, 2, 0, 3, 0. How many page faults occur?
A7 page faults
B5 page faults
C6 page faults
D4 page faults
Step-by-Step Solution
Solution:
  1. Step 1: Trace page faults step-by-step

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

    Option C -> Option C
  3. Quick Check:

    Counting faults carefully yields 6 [OK]
Quick Trick: Count faults only on misses, track LRU correctly [OK]
Common Mistakes:
MISTAKES
  • Counting hits as faults
  • Misidentifying which page is least recently used
  • Off-by-one errors in counting faults
Trap Explanation:
PITFALL
  • Candidates often confuse hits with faults or misapply LRU order, leading to wrong counts.
Interviewer Note:
CONTEXT
  • Tests verbal tracing and understanding of LRU behavior.
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