What is a Deadlock?

According to Coffman deadlock refers to a specific condition when two or when more processes are each waiting for each other to release a resource, or more than two processes are waiting for resources in a circular chain.

It is evident that processes fall into “Deadlock” or no further progress state when all four of the following conditions are met, since there is no way to recover from such situation.

Serially reusable resource (Mutual exclusion)

  • The processes involved share resources, which they use under mutual exclusion.

Pre emption

  • Once acquired by a process, resources cannot be preempted (forcibly withdrawn) but are only released voluntarily.

Wait for cycle

  • A circular chain (or cycle) of processes exists such that each process holds a resource which its successor in the cycle is waiting to acquire.

Incremental accusation

  • Processes hold on to resources already allocated to them while waiting to acquire additional resources.

The diagram below illustrates how the processes wait on a queue to acquire the lock to continue execution.

Share this post

Related Posts