3
$\begingroup$

I have read some notes about the two but yet still confused about why there is a need for the strict 2phase locking. Based on some slides,

Two Phase Locking and Strict Two Phase Locking

They have a single difference which is :

  1. If transaction T releases any lock, it can acquire no new locks. <- 2PL
  2. Hold all locks until end of transaction. <- S2PL

I will like a practical example of a Transaction in both strict and normal.Highlighting the differences.

$\endgroup$

1 Answer 1

1
$\begingroup$

There are mainly two reasons for adopting Strict 2PL rather than Basic 2PL, explained in [1].

  • The first reason is about the time when a 2PL scheduler can release some (read/write) lock owned by some transaction on some data item.

  • A second reason for the scheduler to keep a transaction’s locks until it ends, and specifically until after the DM processes the transaction’s Commit or Abort, is to guarantee a strict execution. Strict executions are recoverable and avoid cascading aborts (ACA).


[1] Chapter 3 "Two Phase Locking" in the Book "Concurrency Control and Recovery in Database Systems"; Page 59. By Bernstein et al., 1987.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.