Deadlock, Livelock and Starvation: Coffman Conditions, Lock Ordering and Priority Inversion
Deadlock can only occur when mutual exclusion, hold and wait, no preemption and circular wait hold together; in practice circular wait is the easiest to break, by taking locks in a global order. We fix a stock transfer that really deadlocks between two Bookstore warehouses with Id ordering in 25 ms, measure a 1 ms timeout turning into a livelock with 621,187 timeouts in 5 seconds, and look at the Mars Pathfinder priority inversion case.
14 Nov 2026
·
11 min
·
12