reset password
Author Message
gbkprajapati
Posts: 8
Posted 19:47 Dec 01, 2015 |

schedule :- w1(x),r2(x),w2(x)

Not   2pl : -   x1(x) , w1(x) ,ul1(x) , sl2(x) ,r2(x) ,xl2 w2(x) , ul2(x) ul2(x)

2 PL :- xl1(x) , w1(x) ,ul1(x) , sl2(x) ,r2(x) , ul2(x),xl2, w2(x) , ul2(x) 

 

 correct or not ?

 

 

 

 

vsluong4
Posts: 87
Posted 20:27 Dec 01, 2015 |

#1, I think this topic is about serial scheduling, not crash recovery

#2 I think you have them reversed

The 2nd one is NOT 2PL because xl1(x), w1(x), ul1(x), sl2(x), r2(x), ul2(x), xl2(x), ul2(x)

TX2 is requesting a lock after releasing another lock

cysun
Posts: 2935
Posted 22:39 Dec 01, 2015 |

For #1, xl2(x) will upgrade the shared lock to an exclusive lock so you just need to ul2(x) once.

And vsluong4 is right - #1 is 2PL while #2 is not.
 

gbkprajapati
Posts: 8
Posted 01:12 Dec 02, 2015 |

Thank very much!!!