The Two-Phase Locking Protocol (Cont.) Two-phase locking does not ensure freedom from deadlocks Extensions to basic two-phase locking needed to ensure recoverability of freedom from cascading roll-back Strict two-phase locking:a transaction must hold all its exclusive locks till it commits/aborts. Ensures recoverability and avoids cascading roll-backs Rigorous two-phase locking:a transaction must hold al/locks till commit/abort. Transactions can be serialized in the order in which they commit. Most databases implement rigorous two-phase locking,but refer to it as simply two-phase locking Database System Concepts-7th Edition 18.10 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 18.10 ©Silberschatz, Korth and Sudarshan th Edition The Two-Phase Locking Protocol (Cont.) ▪ Two-phase locking does not ensure freedom from deadlocks ▪ Extensions to basic two-phase locking needed to ensure recoverability of freedom from cascading roll-back • Strict two-phase locking: a transaction must hold all its exclusive locks till it commits/aborts. ▪ Ensures recoverability and avoids cascading roll-backs • Rigorous two-phase locking: a transaction must hold all locks till commit/abort. ▪ Transactions can be serialized in the order in which they commit. ▪ Most databases implement rigorous two-phase locking, but refer to it as simply two-phase locking