Deadlocks: a cycle of waiting
A group of processes can stop making progress when each waits for a resource held by another in the group.
Mutual exclusion, hold and wait, no preemption and circular wait must coexist for a resource deadlock.
Prevention breaks a necessary condition. Avoidance checks whether granting a request leaves a safe allocation state.
Starvation is indefinite delay while others progress. A long wait alone does not prove deadlock.
How can a consistent lock order help?
Reveal answer / उत्तर देखें
Requiring all threads to acquire locks in the same order can prevent a circular wait among those locks.