696 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.2k
views
1 answers
1 votes
palashbehra5 asked Jan 17, 2022
1,188 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 given is incorrect?
623
views
0 answers
1 votes
aditi19 asked Dec 8, 2018
623 views
is it supported by 2PL?
465
views
0 answers
0 votes
aditi19 asked Nov 11, 2018
465 views
https://gateoverflow.in/1484/gate1999-2-6in this questions after T2 is not granted exclusive lock on A does the transaction T2 gets blocked entirely or it can continue ... , is it deadlock situation here? And is that why it is not 2PL?
169
views
0 answers
0 votes
Balaji Jegan asked Nov 1, 2018
169 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 immediately or we have to unlock only after T2 has also committed?