Difficulty: Easy
Correct Answer: deadlock avoidance
Explanation:
Introduction / Context:
Deadlocks occur when processes wait indefinitely for resources held by each other. Operating systems employ strategies such as prevention, avoidance, detection, and recovery. Banker’s algorithm is a canonical approach; understanding its category is fundamental in OS design.
Given Data / Assumptions:
Concept / Approach:
Banker’s algorithm is a deadlock avoidance technique. Before granting a request, the OS checks whether doing so keeps the system in a safe state. If not safe, the request is deferred. Unlike prevention, it does not structurally constrain resource usage; unlike recovery, it does not roll back after deadlock occurs.
Step-by-Step Solution:
Verification / Alternative check:
Algorithm descriptions explicitly categorize it under “avoidance” because it anticipates unsafe allocations and refuses them preemptively.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing “safe state” (avoidance) with “deadlock-free state” guaranteed by prevention. Also, assuming real systems always know maximum needs; often they do not, limiting practical use.
Final Answer:
deadlock avoidance
Discussion & Comments