Bird
Raised Fist0

A developer suggests that forcing processes to request all required resources upfront completely eliminates deadlocks without any negative impact. What is the main flaw in this reasoning?

medium📚 Background Q7 of Q15
Operating Systems - Deadlock - Four Necessary Conditions (Coffman)
A developer suggests that forcing processes to request all required resources upfront completely eliminates deadlocks without any negative impact. What is the main flaw in this reasoning?
AIt guarantees deadlocks will still occur frequently
BIt can lead to low resource utilization and process starvation
CIt allows processes to hold resources indefinitely without waiting
DIt removes the mutual exclusion condition
Step-by-Step Solution
Solution:
  1. Step 1: Understand forced all-at-once resource requests

    This strategy prevents hold and wait but can cause processes to wait longer before starting.
  2. Step 2: Analyze drawbacks

    Processes may hold resources longer or starve if they request many resources upfront, reducing utilization.
  3. Final Answer:

    Option B -> Option B
  4. Quick Check:

    Pre-requesting all resources may cause starvation [OK]
Quick Trick: Requesting all resources upfront may cause starvation [OK]
Common Mistakes:
MISTAKES
  • Assuming deadlocks are completely impossible
  • Thinking mutual exclusion is removed by this method
  • Believing resource holding time is always minimized
Trap Explanation:
PITFALL
  • Believing deadlocks are fully prevented ignores practical drawbacks like starvation.
Interviewer Note:
CONTEXT
  • Tests understanding of trade-offs in deadlock prevention by eliminating hold and wait.
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