Last Updated : 30 Nov, 2018

Consider the following schedules and find out the irrecoverable schedule:
S1 = W1(A)W2(B)W2(C)C2R1(A)W1(B)C1R3(B)W3(C)C3.
S2 = R1(A)W1(A)R2(A)W2(A)C2C1.
(A) S1 is irrecoverable schedule.
(B) S2 is irrecoverable schedule.
(C) Both are irrecoverable schedules.
(D) Both are recoverable schedule.


Answer: (B)

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