Professional Documents
Culture Documents
Concurrency Control in Database Systems
Concurrency Control in Database Systems
2 2PL Protocol
The Two-Phase Locking (2PL) protocol ensures that the schedules are serializable
and that transactions occur in a controlled manner.
3 Handling Deadlocks
While effective, the 2PL protocol can lead to deadlocks, requiring transactions to be
aborted and restarted to resolve conflicts.
Timestamps
3 Recoverability Protocols
To ensure recoverability, additional protocols are applied to the basic TO algorithm,
preventing non-recoverable schedules.
Strict Timestamp Ordering (STO)
Strict Schedules Delaying Operations
Strict Timestamp Ordering (STO) variation Operations are delayed until the relevant
ensures schedules are strict, aiding in transactions have committed or aborted,
easier recoverability. ensuring order and recoverability.
Lock Simulation
STO simulates the locking of items to manage access until transactions are resolved, without
causing deadlocks.
Thomas's Write Rule
1 2 3
Abort Ignore Execute
If a read timestamp is greater than If a write timestamp is greater, the When conditions allow, the write
the transaction's timestamp, the write operation is ignored to avoid operation is executed and the
transaction is aborted. outdated operations. write timestamp is updated.