Bird
Raised Fist0

You are designing a virtual memory system for a high-performance server with frequent context switches. Which TLB design choice best balances Effective Access Time (EAT) and context switch overhead?

hard🌍 Real-world Scenario Q9 of Q15
Operating Systems - TLB - Translation Lookaside Buffer & Effective Access Time
You are designing a virtual memory system for a high-performance server with frequent context switches. Which TLB design choice best balances Effective Access Time (EAT) and context switch overhead?
AUse a fully associative TLB with a large number of entries and flush it on every context switch
BDisable the TLB and rely solely on fast page table walks
CUse a small, set-associative TLB and flush it on every context switch
DUse a tagged TLB that supports multiple address spaces without flushing on context switches
Step-by-Step Solution
Solution:
  1. Step 1: Understand context switch impact

    Context switches invalidate TLB entries if not tagged by address space ID.
  2. Step 2: Analyze options

    A: Incorrect -- large fully associative TLB improves hit ratio but flushing on every switch causes overhead.
    B: Correct -- tagged TLB allows multiple address spaces without flushing, reducing overhead and improving EAT.
    C: Incorrect -- small set-associative TLB with flushing still incurs overhead.
    D: Incorrect -- disabling TLB drastically increases EAT due to page table walks.
  3. Final Answer:

    Option D -> Option D
  4. Quick Check:

    Tagged TLB avoids flushes, balancing EAT and context switch cost [OK]
Quick Trick: Tagged TLB avoids flush overhead on context switches [OK]
Common Mistakes:
MISTAKES
  • Ignoring flush overhead on context switches
  • Assuming bigger TLB always better despite flush cost
  • Thinking disabling TLB is viable for performance
Trap Explanation:
PITFALL
  • Candidates overlook flush cost and miss benefits of tagged TLBs in multi-process systems.
Interviewer Note:
CONTEXT
  • Assesses system design trade-offs involving TLB and context switches.
Master "TLB - Translation Lookaside Buffer & Effective Access Time" 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