379 views

1 Answer

4 votes
4 votes

There are two possibilities about conflict serializable.

S1 : T1->T2            S2 : T2->T1

Take case S1.

Here conflicting schedules R1(A) ->W2(A)  (hence W2(A) must occur after R1(A))

Same applies for R2(A). It should be occur after W1(A).

Hence our situation is R1(A) W1(A) R2(A) W2(A).

By applying above property R2(B)W2(B) must occur last. (to maintain T1->T2)

Hence, R1(A) W1(A) _ _ _ _ R2(B) W2(B).

No for between 4 positions there will be 4! possibilities.

But basic rule is we can't change order of original transaction sequence.

hence R2(A) must come before W2(A) and also R1(B) must come before W1(B) (There is no relation between these 4)

Hence to maintain above restriction,

number of schedules = 4!/(2!*2!) = 6 schedules.

Same applies for S2 : T2->T1 (another 6).

hence answer will be 6+6 = 12.

Related questions

3 votes
3 votes
1 answer
1
4 votes
4 votes
0 answers
2
1 votes
1 votes
2 answers
4
gatecrack asked Dec 10, 2018
732 views
T1T2R(A) W(A)W(A) IS THIS IS VIEW SERIALIZABLE?PLZ EXPLAIN