Strict Two-Phase Locking
Deadlock
The waits-for graph is contained in the lock manager's data structures.
Each lock has a queue of waiting transactions.
Fix deadlock when it occurs
- Periodically, the lock manager checks the waits-for graph.
- If a cycle is found, pick a transaction and kill it.
- The transaction's process is waiting.
- Killing it causes the wait to end, throwing an exception.
|