We evaluate the matching of OS deadlock handling strategies with their characteristics or specific algorithms.
1. Deadlock Prevention (A-III):
Prevention involves ensuring that at least one of the four necessary conditions for deadlock cannot hold. Breaking the Circular Wait condition is a primary method of prevention by imposing a linear ordering of resource acquisition.
2. Deadlock Detection (B-IV):
Detection algorithms allow the system to enter a deadlocked state and then periodically run an algorithm to find it. This process (often involving Resource Allocation Graphs) carries High overheads in terms of CPU time and performance.
3. Deadlock Avoidance (C-I):
Avoidance requires the system to have additional a priori information about resource requests. The Banker's Algorithm is the classic avoidance algorithm used to determine if allocating a resource will keep the system in a "safe state."
4. Recovery from Deadlock (D-II):
Once a deadlock is detected, the system must break it. One common recovery method is Rollback, where one or more processes are returned to a previous safe checkpoint and restarted.