Difficulty: Easy
Correct Answer: deadlock avoidance
Explanation:
Introduction / Context:
Deadlocks occur when processes wait cyclically for resources. The banker’s algorithm is a resource-allocation strategy that prevents unsafe states by simulating allocations and only granting requests that keep the system in a safe state.
Given Data / Assumptions:
Concept / Approach:
Deadlock avoidance aims to ensure the system never enters a state from which deadlock is possible. The banker’s algorithm models future requests and releases, and approves only those resource grants that leave at least one safe sequence to completion for all processes.
Step-by-Step Solution:
Verification / Alternative check:
OS texts distinguish prevention, avoidance, detection/recovery. Banker’s fits the “avoidance” category by safety checks prior to allocation.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming the algorithm detects deadlocks post-hoc; forgetting it needs declared maximums and can be conservative or costly for large systems.
Final Answer:
deadlock avoidance
Discussion & Comments