Two-phase locking (2PL), strict 2PL and deadlock
How two-phase locking (2PL) makes concurrent transactions serializable, why it can deadlock, and how strict 2PL stops dirty reads and cascading aborts.
Part of Transactions.
Read first
- Conflict serializability and precedence graphs
How a database tells if interleaved transactions are safe: conflicts, the precedence graph and conflict serializability, shown on a lost update.
Related
- Undo and redo logging: write-ahead logging (WAL)
How write-ahead logging (WAL) makes transactions atomic and durable: undo, redo and undo/redo logs, their write rules, crash recovery, steal and force.