Conditions for a Deadlock to arise
- Mutual exclusion: There has to be at least one resource that cannot be shared. So that only one process would use at any given time.
- Resource holding (or hold and wait): There should be at least one resource held by a process that in turn should be request more resources that are being held by other processes.
- No preemption: Once the resources have been allocated, they should not de-allocated by the operating system. The condition is that the process holding the resource must release it voluntarily.
- Circular wait: A circular chain of processes must be formed as explained in the earlier example.
- Ignoring deadlock