301 views
0 votes
0 votes

is it true that

 if schedule is 2pl(P) then it is  serializable(Q) too

It is mentioned one of in comment of answer https://gateoverflow.in/1484/gate1999-2-6

I don't think so

T1 T2
  Write B (T2 acquire Ex(B))
Write B(T1 not able acquire Ex(B))  
  Write A (T2 acquire Ex(A))
Write A(T1 not able acquire Ex(A))  
  Write A(T2 already holds Ex(A))

Cleary it is 2PL but not serializable (as there is cycle)

So my question is "Is there any correlation between 2PL and serializability" 

 

 

 

1 Answer

Best answer
1 votes
1 votes

is it true that

 if schedule is 2pl(P) then it is  serializable(Q) too

Yes. If any Schedule is allowed by the 2PL protocol then It is Serializable. 

Refer my answer here : https://gateoverflow.in/223561/self-doubt


 Cleary it is 2PL but not serializable (as there is cycle)

No, the given schedule is Not allowed by the 2PL protocol. $W_1(B)$ will have to wait until complete $T_2$ is completed. 

selected by

Related questions

0 votes
0 votes
0 answers
2
sumit goyal 1 asked Dec 25, 2017
630 views
To determine it is strict we have to go from left to right or from right to left ??
0 votes
0 votes
1 answer
4