679 views
0 votes
0 votes
how does a 2 phase locking protocol cause deadlock ?

and why is it conflict serializable

1 Answer

0 votes
0 votes

Conflict  serializable it possible in Basic 2PL because it has following feature:

1> All locks should be acquired in growing phase only.

2->locks will be release in shrinking phase.

because a lock has got acquired in growing phase it can not be acquired again. so you will not get something like.

 T1 T2
x(A)  
WRITE A  
RELEASE A  
  X(A)
  WRITE A
  RELEASE A
GET A READ LOCK OR WRITE LOCK(NOT POSSIBLE)  

because you can get locks only in growing phase once you release the lock you cant acquire locks after, this will ensure conflict serializablty.

Related questions

1 votes
1 votes
1 answer
1
palashbehra5 asked Jan 17, 2022
1,120 views
Given Problem : S1 can be shown allowed under 2PL.However, the solution that they have provided for S2 : Seems wrong, as So, is S2 allowed under 2PL, or the answer give...
1 votes
1 votes
0 answers
2
0 votes
0 votes
0 answers
4
Balaji Jegan asked Nov 1, 2018
161 views
Regarding Strict 2PL and Rigorous 2PL. T1 acquired Exclusive lock on data item A. T2 acquired exclusive lock on data item B. Suppose T1 has committed. Can we unlock A imm...