43 views

In this answer, how is the number of conflict equivalent schedule equal to T1->T2 equal to 1(How is it being calculated). And how is the number of conflict equivalent schedule equal to T2->T1 being calculated??It is very confusing please Help!!!!!

| 43 views
0

T1: r1(X), w1(X), r1(Y), w1(Y)

T2: r2(Y), w2(Y), r2(Z), w2(Z)

finding conflict equivalents from T1 to T2 ===> it means first T1 started then T2.

conflict serializable schedule means, your schedule should conflict equivalent to serial schedule.

what are the conflicting operations between T1 and T2 ?

i) T1 :  R(y) with T2: W2(y)

ii) T1 :  W1(y) with T2: R2(y) and

iii) T1 :  W1(y) with T2: W2(y)

So, ( you are interested in T1 -> T2 ) ===> T1 :  W1(y) should be before T2: R2(y) , so howmany combinations remaining can have ?

only one schedule you can have :- r1(X), w1(X), r1(Y), w1(Y), r2(Y), w2(Y), r2(Z), w2(Z).

i know, i explained easy one, try to get the other part, read the answer 2-3 times if you didn't get it !

after that Still if you didn't get comment !!

0
Why can't we swap R1(x)/W1(x) with R2(z)/W2(z), they are non conflicting right??? And non conflicting operations can be swapped right???

0

Why can't we swap R1(x)/W1(x) with R2(z)/W2(z), they are non conflicting right??? And non conflicting operations can be swapped right???

write your schedule, i will tell where you are wrong.

0
suppose we write r2(Z), w2(Z), r1(Y), w1(Y), r2(Y), w2(Y),r1(X), w1(X).....
0
This might be completely wrong and foolish!!! But I want to understand the concept properly.
0
first point is :- in a transaction, all operations sequence should be preserved !

So, r2(Z) should be after W2(y) and W2(Y) should be after R2(y)

Now check howmany schedules you are getting
0
Ok, So there will be 1 schedule for T1->T2, but can't understand what you have done for T2->T1....