- Back to Home »
- Deadlock Characterization in Operating System
Deadlock Characterization in Operating System:
Deadlock occurs if the following four conditions take place simultaneously in a system:
1. Mutual Exclusion:
At least one resource must be held in a non-sharable mode. It means that only one process at a time can use the resource. If another process requests the resource, the requesting process must be delayed until the resource has been released.
2. Hold and Wait:
A process must be holding at least one resource and waiting, to acquire additional resources that are currently being held by other processes.
3. No Preemption:
Resources cannot be preempted. A resource can be released only voluntarily by the process holding it after that process has completed its task.
4. Circular Wait:
A set {P0 P1, P2... Pn} of waiting processes must exist such that P1 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 Pn is waiting for a resource that is held by P0.
All four conditions must hold for a deadlock to occur.