tutebox.com

Computers

What is a Deadlock?

August 6, 2010 by Haneez Haroon in Programming with 0 Comments

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.

Tagged ,

Recommend this post

About Haneez Haroon

A Software Engineer by profession, A Tech Entrepreneur. Currently working as the lead developer at Catalyst Interactive. Follow me on twitter @iHaneez

View all posts by Haneez Haroon →

Related Posts

Leave a reply

Your email address will not be published. Required fields are marked *

*

Stay Connected