2,491 views

Consider the following schedule

$\text{S : r2(A), w1(B), w1(C), R3(B), r2(B), r1(A), commit_1, r2(C), commit_2, w3(A), commit_3 }$

Consider the following statements :
S1 : Schedule(S) is conflict serializable schedule.
S2 : Schedule(S) is allowed by 2PL.
S3 : Schedule(S) is strict recoverable schedule.
S4 : Schedule(S) is allowed by strict 2PL.
How many above statements true about schedule(S) ?

@Shubhanshu can you please tell what's the final answer for this question, which statements are correct so that we can understand which part we r going wrong if any nd understand from the comments.

because it's not clear what is the exact conclusion of this discussion.

s1: True: conflict serializable to schedule >> $T_{1}\rightarrow$$T_{2}\rightarrow T_{3}$

S2: True: allowed in basic  2PL.

s3: False

strict recoverable schedule>> if transaction $T_{i}$ updates the data item A, then any other transaction $T_{j}$ not allowed to R(A) or W(A) until commit or rollback of $T_{i}$.

 $T_{i}$ $T_{j}$ W(A) ..... commit or rollback R(A) or W(A)

s4: False>>>  strict 2PL is basic 2PL in which all exclusive locks should be hold until commit or rollback

but here R$_{2}$(B) request for shared lock on B and B is already locked(xclusive) by   $T_{1}$.

S1 : true

S2 : true

S3 : false

S4: false
by
S1 is true as there is no cycle in the precedence graph.

S2 is true by as we can achieve a schedule by first acquiring locks and then releasing the locks when required.

S3 is false as we can see one instance in the schedule where T2 is reading data B even before commit by T1 as T1 has written it before.

S4 is false as if apply strict 2PL, T3 will try read data item B as the lock on B will held by T1.
by