Condition for deadlock occurrence?

Deadlock can arise if four conditions hold simultaneously.Mutual exclusion:  only one process at a time can use a resource.Hold and wait:  a process holding at least one resource is waiting to acquire additional resources held by other processes.No preemption:  a resource can be released only voluntarily by the process holding it, after that process has completed its task.Circular wait:  there exists a set {P0, P1, …, P0} of waiting processes such that P0 is waiting for a resource that is held by P1, P1 is waiting for a resource that is held by P2, …, Pn–1 is waiting for a resource that is held by
Pn, and P0 is waiting for a resource that is held by P0.

Showing Answers 1 - 1 of 1 Answers

The condition for the occurrence of deadlocks are

Mutual Exclusion: At least one resource must be non-shareable.[1] Only one process can use the resource at any given instant of time.

Hold and Wait or Resource Holding: A process is currently holding at least one resource and requesting additional resources which are being held by other processes.

No Preemption: The operating system must not de-allocate resources once they have been allocated; they must be released by the holding process voluntarily.

Circular Wait: A process must be waiting for a resource which is being held by another process, which in turn is waiting for the first process to release the resource. In general, there is a set of waiting processes, P = {P1, P2, ..., PN}, such that P1 is waiting for a resource held by P2, P2 is waiting for a resource held by P3 and so on till PN is waiting for a resource held by P1

The above conditions must occur simultaneously in a system only then a deadlock arises.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions