Two-phase locking separates lock acquisition from release.

highlighted = computed this step

Two-phase locking

2PL has a growing phase where a transaction acquires locks and a shrinking phase after release. This book shows the lock state, not a new serializability proof. Note: Book Five already built the conflict graph idea.

two phase locking\text{two phase locking}

Growing then shrinking

The compiled trace has 4 operations over 2 lock-table items. Note: the render shows which locks survive at the end.

ops=4,items=2\text{ops}=4,\quad \text{items}=2

2PL and MVCC are exact protocol traces on tiny schedules; real lock managers, deadlock avoidance/timeouts, version garbage-collection, and isolation-level tuning are beyond these traces - no product claims.

Two phase lockingitemmodeholderswaitersA---BST2- deadlock: noT1T2

Summary

2PL is a mechanism for controlling conflicting access by lock acquisition and release. Note: 2PL and MVCC are exact protocol traces here; real lock managers, timeouts, garbage collection, and isolation tuning are beyond these traces.

locking mechanism\text{locking mechanism}