Bird
Raised Fist0

Why is it generally inefficient to implement all OS services as system calls requiring mode switches?

medium🪤 Complexity Trap Q13 of Q15
Operating Systems - System Call - Mechanism & Modes (User vs Kernel)
Why is it generally inefficient to implement all OS services as system calls requiring mode switches?
ABecause mode switches cause significant CPU overhead and latency
BBecause system calls cannot access hardware devices
CBecause user mode has unrestricted access to kernel data structures
DBecause system calls bypass the CPU privilege checks
Step-by-Step Solution
  1. Step 1: Understand mode switch cost

    Switching from user to kernel mode involves saving/restoring CPU state and flushing pipelines, which is expensive.
  2. Step 2: Why not all services as system calls

    Excessive mode switches degrade performance, so only critical OS services use system calls.
  3. Step 3: Why other options are incorrect

    Because system calls cannot access hardware devices is false; system calls are the mechanism to access hardware safely. Because user mode has unrestricted access to kernel data structures is false; user mode is restricted from kernel data. Because system calls bypass the CPU privilege checks is false; system calls enforce privilege checks via mode switch.
  4. Final Answer:

    Option A -> Option A
  5. Quick Check:

    Mode switch overhead limits system call usage [OK]
Quick Trick: Mode switches are costly, so minimize system calls
Common Mistakes:
MISTAKES
  • Believing system calls cannot access hardware
  • Thinking user mode has full kernel access
  • Assuming system calls skip privilege checks
Trap Explanation:
PITFALL
  • Options B, C, and D reflect common misunderstandings about privilege and hardware access. The real limitation is performance overhead of mode switches.
Interviewer Note:
CONTEXT
  • Tests understanding of trade-offs and performance implications of system call design.
Master "System Call - Mechanism & Modes (User vs Kernel)" 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