[prev] 18 [next]

Two-Phase Locking

To guarantee serializability, we require an additional constraint:
  • in every tx, all lock requests precede all unlock requests
Each transaction is then structured as:
  • growing phase where locks are acquired
  • action phase where "real work" is done
  • shrinking phase where locks are released

Clearly, this reduces potential concurrency ...