Bird
Raised Fist0

Imagine a system where a context switch occurs every 5 milliseconds. If the context switch overhead is 0.5 milliseconds, what is the effective CPU time available for processes in each 5 ms interval?

easy🧠🧾 Concept Trace Q3 of Q15
Operating Systems - Context Switch - Cost & Causes
Imagine a system where a context switch occurs every 5 milliseconds. If the context switch overhead is 0.5 milliseconds, what is the effective CPU time available for processes in each 5 ms interval?
A0.5 milliseconds
B5 milliseconds
C4 milliseconds
D4.5 milliseconds
Step-by-Step Solution
Solution:
  1. Step 1: Calculate effective CPU time

    Each 5 ms interval includes 0.5 ms overhead for context switching, so usable CPU time = 5 ms - 0.5 ms = 4.5 ms.
  2. Step 2: Check other options

    5 milliseconds ignores overhead. 0.5 milliseconds mistakes overhead as usable time. 4 milliseconds subtracts 1 ms incorrectly.
  3. Final Answer:

    Option D -> Option D
  4. Quick Check:

    Subtract overhead from total interval [OK]
Quick Trick: Subtract context switch overhead from total interval [OK]
Common Mistakes:
MISTAKES
  • Ignoring overhead in calculation
  • Confusing overhead as usable time
  • Incorrect subtraction amount
Trap Explanation:
PITFALL
  • Candidates often forget to subtract overhead or confuse overhead with usable CPU time.
Interviewer Note:
CONTEXT
  • Tests ability to reason about overhead impact on CPU availability.
Master "Context Switch - Cost & Causes" 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