search
Log In
0 votes
128 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!!!!!

in Databases 128 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???

And for T2->T1 I am not able to get it even after reading it 10-15 times..Please Help
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....

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
183 views
How can 2PL protocol ( simple one ) ensure conflict serializability even though it cannot ensure freedom from deadlock ? I mean ,if a schedule is conflict serializable it has a conflict equivalent to a serial schedule and serial schedules won't have deadlocks .Right ?
asked Mar 30, 2019 in Databases ashunimbz 183 views
1 vote
2 answers
2
1 vote
1 answer
3
210 views
Do commit operations matter while checking serilizability?If yes why?
asked Jan 28, 2017 in Databases Gate Madrista 210 views
0 votes
1 answer
4
312 views
Account on the following statements IF Conflict Serial schedule then it is ALWAYS possible under 2PL
asked Sep 18, 2016 in Databases pC 312 views
...