Deadlock
A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause.
There are four conditions that must hold for deadlock
- Mutual exclusion condition
Each resource is either currently assigned to exactly one process or is available.
- Hold and wait condition
Process currently holding resources granted earlier can request more resources.
- No preemption condition
Previously granted resources cannot be forcibly taken away from process.
- Circular wait condition
There must be a circular chain of 2 or more processes. Each process is waiting for resource that is held by next member of the chain.
All four of these conditions must be present for a deadlock to occur.