Last Updated : 30 Nov, 2018

Which of the following schedule is recoverable?
(B) R1(A)W1(A)R2(A)W2(A)C2C1
(D) (B)C1R3(B)W3(C)C3


Answer: (D)

Explanation: S1 = W1(A)W2(B)W2(C)C2R1(A)W1(B)W2(C)C2C1R3(B)W3(C)C3.
S1 is recoverable since there is only one updated read which is also after other transaction got committed.
S2 = R1(A)W1(A)R2(A)W2(A)C2C1.
T2 in S2 is reading updated value of A from T1 and T1 is not committed yet, T2 must wait to commit till T1 is not not committed
S is a recoverable schedule but it does not avoid cascaded rollback and it is not a serial schedule also.
So, option (B) is correct.

Quiz of this Question


Share your thoughts in the comments