Bird
Raised Fist0

In an operating system that supports nested system calls (a system call invoked while already executing in kernel mode), which strategy best prevents deadlocks and maintains system stability?

hard🚀 Advanced Concept Q8 of Q15
Operating Systems - System Call - Mechanism & Modes (User vs Kernel)
In an operating system that supports nested system calls (a system call invoked while already executing in kernel mode), which strategy best prevents deadlocks and maintains system stability?
ADisable further mode switches and execute nested calls in the current kernel mode context.
BForce a return to user mode before handling any nested system calls.
CQueue nested system calls and process them only after the current call completes.
DAllow nested system calls to switch back to user mode temporarily.
Step-by-Step Solution
Solution:
  1. Step 1: Identify the problem with nested calls

    Nested system calls can cause repeated mode switches or inconsistent states if not handled properly.
  2. Step 2: Evaluate strategies

    Disabling further mode switches and executing nested calls within the current kernel context avoids unnecessary transitions and deadlocks.
  3. Final Answer:

    Option A -> Option A
  4. Quick Check:

    Nested calls run safely in kernel mode without extra switches [OK]
Quick Trick: Nested calls run inside kernel mode without switching [OK]
Common Mistakes:
MISTAKES
  • Forcing return to user mode breaks kernel execution flow
  • Queuing calls delays critical kernel operations unnecessarily
  • Switching back to user mode mid-kernel risks privilege violations
Trap Explanation:
PITFALL
  • Option C seems safe but queuing can cause delays and deadlocks.
Interviewer Note:
CONTEXT
  • Evaluates knowledge of kernel mode nesting and safe system call handling.
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