Which of the following is a conflict serializable schedule? S1: R1(A); R1(B); R2(A); R2(B); W2(B); W1(A)
Which of the following is a conflict serializable schedule?
S1: R1(A); R1(B); R2(A); R2(B); W2(B); W1(A)
S2: R1(A); R2(A); R2(B); W2(B); R1(B); W1(A)
Show answerHide answer
Correct answer: (B) S1 is not conflict serializable but S2 is conflict serializable.
Explanation
S1 has R1(B) before W2(B) (T1→T2) and R2(A) before W1(A) (T2→T1), which forms a cycle. S2 only has edges T2→T1, so it is conflict serializable (equivalent to T2, T1).