2 votes 2 votes Can someone write one example of a schedule which is conflict serializable but is not allowed by 2pl protocol. I have read that 2pl-> css, but css-> 2pl is not necessary? Aryan asked Apr 10, 2016 Aryan 4.4k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes T1 T2 T3 W(A) W(A) W(A) W(B) W(B) W(B) ManojK answered Apr 10, 2016 ManojK comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments ManojK commented Jan 7, 2017 reply Follow Share No above schedule is not allowed in 2PL. You can,t lock data item B in transaction T1 because it is already locked by T2.So unlocking of A can,t be performed by T1 so T3 is n,t allowed to lock data item A.So not allowed in 2PL. IN 2PL you should keep in mind that All the lock operations precedes all the unlock operations. Every 2PL schedule is also conflict serializable schedule but converse is not true.i.e Every conflict serializable schedule may or may not in 2PL. 2 votes 2 votes Pooja surbhi Gupta commented Aug 2, 2017 reply Follow Share But when t2 will release lock on b, t1 can aquire as waiting is allowed 0 votes 0 votes Debugger commented Jan 9, 2020 i edited by Debugger Jan 22, 2020 reply Follow Share How 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes I am not a hundred percent sure but, W1A R2A R1A This is conflict Serializable but not in 2pl. Please correct me. yuyutsu answered Feb 14, 2022 yuyutsu comment Share Follow See 1 comment See all 1 1 comment reply gerteck commented Apr 4 reply Follow Share That is correct, T1 releases its exclusive lock for T2 to acquire a shared lock to R2(A), and subsequently reacquires a shared lock to R1(A). Hence this is not a 2PL schedule. However, it is conflict serializable since there is only one WR conflict, and if you sketch the conflict serializability graph, it is acyclic. It is conflict equivalent to a serial execution of T1, T2. 0 votes 0 votes Please log in or register to add a comment.