Conditions for a deadlock
Four preconditions that must be present for a deadlock to occur:
- Mutual exclusion: Only one process can use a resource at a time.
- Hold and wait: A process must hold the resources while awaiting assignment of other resources.
- No preemption: No resource can be forcibly removed from a process holding it.
- Circular wait: A closed chain of processes exists, such that each process holds at least one resources needed by the next process in the chain.