Bird
Raised Fist0

If you extend the OS to allow user-level threads to make system calls without blocking the entire process, which modification is essential to the system call mechanism?

hard🎤 Interviewer Follow-up Q10 of Q15
Operating Systems - System Call - Mechanism & Modes (User vs Kernel)
If you extend the OS to allow user-level threads to make system calls without blocking the entire process, which modification is essential to the system call mechanism?
AImplement per-thread kernel stacks and context to allow independent mode switches per thread.
BDisable mode switching during system calls to prevent thread interference.
CForce all threads to share a single kernel stack to simplify system call handling.
DConvert all system calls to asynchronous signals handled in user mode.
Step-by-Step Solution
Solution:
  1. Step 1: Understand user-level threads and system calls

    User-level threads require independent kernel context to avoid blocking others.
  2. Step 2: Identify necessary kernel support

    Per-thread kernel stacks and context enable independent mode switches and system call handling.
  3. Step 3: Evaluate other options

    Disabling mode switch or sharing kernel stack causes blocking or corruption; async signals don't replace system calls.
  4. Final Answer:

    Option A -> Option A
  5. Quick Check:

    Per-thread kernel context enables non-blocking system calls. [OK]
Quick Trick: Per-thread kernel stacks enable independent system calls [OK]
Common Mistakes:
MISTAKES
  • Thinking mode switch can be disabled
  • Assuming shared kernel stack is safe
  • Believing async signals replace system calls
Trap Explanation:
PITFALL
  • Candidates often overlook kernel support needed for user-level threading and system calls.
Interviewer Note:
CONTEXT
  • Probes deep understanding of threading and system call interaction.
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