Last Updated : 29 Nov, 2018

Indicate which of the following schedules are admissible (i.e., could have been produced) under a legal, two-phase-locking schedule:
S1 = r1(A); w1(A); W2(B); w3(C); r1(D); W2(D)
S2 = r3(A); w4(A); r1(C); r3(D); w3(B); w2(D); r3(A); w1(D); r3(B); r2(C); r1(A)

(A) I
(B) II
(C) Both I and II
(D) Neither I nor II.


Answer: (A)

Explanation: S1 = l1(A)r1(A); w1(A);l2(B) W2(B);l3(C) W3(C);u3l1(D) r1(D);u1(D)u1(A)l2(D) W2(D)u2(B)u2(B)
S2 = r3(A); w4(A); r1(C); r3(D); w3(B); w2(D); r3(A); w1(D); r3(B); r2(C); r1(A)
No, this schedule is not admissible (i.e., could have been produced) under a legal, two-phase-locking schedule, r2(C) is problemetic and w1(D) conflicts with r2(C).
So, option (A) is correct.


Quiz of this Question


Share your thoughts in the comments