Deadlock prevention. Prevents deadlocks by restraining requests made to ensure that at least one of the four deadlock conditions cannot occur . Deadlock avoidance. Dynamically grants a resource to a process if the resulting state is safe.
There are three ways of handling deadlocks: 1) Deadlock prevention or avoidance - Do not allow the system to get into a deadlocked state. 2) Deadlock detection ...
Deadlock prevention: Ensure that a necessary condition cannot hold. • Deadlock avoidance: Monitor does not allocate resources that will lead to a deadlock.
Deadlock Avoidance examines the resource-allocation state and make sure that it is safe. e.g., the system never satisfies the circular- wait condition.