Bird
Raised Fist0

Which deadlock prevention strategy is most viable, and what is a key limitation of this approach?

hard🎤 Interviewer Follow-up Q10 of Q15
Operating Systems - Deadlock - Four Necessary Conditions (Coffman)
Suppose you have a system where preemption is impossible, but you want to prevent deadlocks without restricting hold and wait or mutual exclusion. Which deadlock prevention strategy is most viable, and what is a key limitation of this approach?
AEliminate circular wait by imposing a global resource ordering; limitation: requires careful design and may reduce flexibility.
BForce processes to request all resources at once; limitation: can cause resource starvation.
CAllow preemption of resources; limitation: not possible as preemption is impossible here.
DMake all resources sharable; limitation: not feasible for exclusive resources.
Step-by-Step Solution
Solution:
  1. Step 1: Understand constraints

    No preemption allowed; hold and wait and mutual exclusion remain.
  2. Step 2: Identify viable strategy

    Eliminating circular wait by global ordering is viable without preemption or hold and wait elimination.
  3. Step 3: Recognize limitation

    Global ordering requires careful design and can reduce system flexibility.
  4. Step 4: Why others are incorrect

    Forcing all resources causes starvation, preemption impossible, making all resources sharable often infeasible.
  5. Final Answer:

    Option A -> Option A
  6. Quick Check:

    Global ordering prevents circular wait without preemption [OK]
Quick Trick: Global ordering prevents circular wait without preemption [OK]
Common Mistakes:
MISTAKES
  • Choosing preemption despite impossibility
  • Ignoring limitations of global ordering
Trap Explanation:
PITFALL
  • Candidates often pick preemption or overlook design complexity of ordering.
Interviewer Note:
CONTEXT
  • Tests deep understanding of deadlock prevention under strict constraints.
Master "Deadlock - Four Necessary Conditions (Coffman)" 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