Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Condition For Deadlock Notes

Conditions for Deadlockfooter line

 

Mutual Exclusion

  • The resources involved must be unshareable.
  • Every resource is either currently allocated to  exactly one process or it is available. (Two  processes cannot simultaneously control the same  resource ).

 

Mutual Exclusion

 

 

 

Hold and Wait

There must exist a process that is holding  at least one resource and is waiting to  acquire additional resources that are  currently being held by other processes.

 

 

 

No Preemption Condition

If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released implicitly. Then the preempted resources are added to the list of resources for which the process is waiting. 

 

Circular Wait

In circular wait a chain of processes exists  in which each process waits for one or  more resources held by the next process in  the chain.

 

 

 

Circular Wait