Deadlocks
A set of transactions is deadlocked if every transaction in the set is blocked and will remain blocked unless the system intervenes.
- Example rl1[x] granted rl2[y] granted wl2[x] blocked wl1[y] blocked and deadlocked
Deadlock is 2PL’s way to avoid non-SR executions
- rl1[x] r1[x] rl2[y] r2[y] … can’t run w2[x] w1[y] and be SR
To repair a deadlock, you must abort a transaction
- if you released a transaction’s lock without aborting it, you’d break 2PL