0
5.6kviews
What is the difference between deadlock avoidance and dead lock prevention
1 Answer
0
275views

Difference between Deadlock Avoidance and Deadlock Prevention

Sr. No. Topic Deadlock Avoidance Deadlock Prevention
1. Definition This ensures that the system does not enter an unsafe state. This ensures that at least one of the necessary conditions for deadlock can never occur.
2. Procedure It automatically considers requests and checks whether it is safe for the system or not. It prevents deadlock by constraining the resource request process and handling of resources.
3. Information Required In this system requires information on the existing resources, resource availability, and resource requests to find whether the system is in a safe or unsafe state. In this system does not require information on the existing resources, resource availability, and resource requests.
4. Future Resource Requests Knowledge This requires the knowledge of all future process resource requests. This doesn’t require knowledge of future process resource requests.
5. State of Resources The requests for resources are manipulated until at least one safe path is found. All resources are requested at once.
6. Resource Allocation Strategy It uses a non-conservative strategy. It uses a conservative strategy.
7. Preemption In deadlock avoidance there is no preemption. In deadlock prevention here preemption occurs more frequently.
8. Benefits There is no system under-utilization as this method works dynamically to allocate the resources. It doesn’t have any cost involved in detecting and resolving deadlocks and it has to just make one of the conditions false so that deadlock doesn’t occur.
9. Drawbacks No process should exit while holding resources. This can block processes for too long. This has low device utilization and degradation of system performance.
10. Algorithms Used Banker’s Algorithm, Safety Algorithm, Resource-Allocation Graph Algorithm. Non-blocking Synchronization Algorithms, Spooling, Hold & Wait, Mutual Exclusion, No Preemption, Circular Wait, Serializing Tokens.
Please log in to add an answer.