Bird
Raised Fist0

In a system where processes have highly variable maximum resource claims and some processes hold resources for very long durations, which approach is better and why: Banker's Algorithm or Deadlock Detection with Recovery?

hard⚖️ Approach Comparison Q8 of Q15
Operating Systems - Banker's Algorithm - Safe State & Resource Allocation
In a system where processes have highly variable maximum resource claims and some processes hold resources for very long durations, which approach is better and why: Banker's Algorithm or Deadlock Detection with Recovery?
ABanker's Algorithm is better because it prevents deadlock proactively regardless of process behavior variability.
BDeadlock Detection with Recovery is better because Banker's Algorithm requires fixed maximum claims and can be overly conservative in such dynamic environments.
CBanker's Algorithm is better because it dynamically adjusts maximum claims based on process resource holding times.
DDeadlock Detection with Recovery is worse because it cannot handle long resource holding durations effectively.
Step-by-Step Solution
Solution:
  1. Step 1: Consider Banker's Algorithm assumptions

    It requires known fixed maximum claims and can be too restrictive if claims vary or processes hold resources long.
  2. Step 2: Evaluate Deadlock Detection with Recovery

    This approach tolerates dynamic behavior and resolves deadlocks after detection, suitable for variable claims.
  3. Step 3: Analyze options

    Deadlock Detection with Recovery is better because Banker's Algorithm requires fixed maximum claims and can be overly conservative in such dynamic environments correctly identifies Deadlock Detection as better here. Banker's Algorithm is better because it prevents deadlock proactively regardless of process behavior variability ignores Banker's limitations. Banker's Algorithm is better because it dynamically adjusts maximum claims based on process resource holding times incorrectly claims dynamic adjustment. Deadlock Detection with Recovery is worse because it cannot handle long resource holding durations effectively wrongly states detection is ineffective with long holds.
  4. Final Answer:

    Option B -> Option B
  5. Quick Check:

    Banker's Algorithm needs fixed max claims; detection suits dynamic cases [OK]
Quick Trick: Banker's Algorithm needs fixed max claims; detection handles variability [OK]
Common Mistakes:
MISTAKES
  • Assuming Banker's Algorithm adapts to dynamic claims
  • Overestimating Banker's Algorithm's flexibility
  • Misjudging deadlock detection effectiveness
Trap Explanation:
PITFALL
  • Candidates often overgeneralize Banker's Algorithm applicability to dynamic resource environments.
Interviewer Note:
CONTEXT
  • Tests ability to compare approaches under corner-case system behaviors.
Master "Banker's Algorithm - Safe State & Resource Allocation" 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