Strict Two-Phase Locking
2PL and Serializability
Why does 2PL guarantee serializability?
- Without locking, RW, WR and WW conflicts develop independently and
can contradict each other, e.g. T1 < T2 and T2 < T1.
- A lock enforces precedence. If T1 locks X, then T1 precedes all
other transactions that need X.
|