4,062 views
14 votes
14 votes
How many view equal serial schedules possible for the following
schedule?
S : w1(A) r2(A) w3(A) r4(A) w5(A) r6(A) w7(A) r8(A

4 Answers

Best answer
14 votes
14 votes

Rule 1 : If T reads the initial data in S1, then it also reads the initial data in S2 . Means Initial read must be same.

Rule 2: we have to maintain Write-Read dependency

Rule 3:  final operation should be same in all equivalent serial schedules .

This 3 rules we need to follow.

here is blind write perform by T1, T3 and T5.

and  T7 T8 are final operation , which is fixed.

T1->T2 and T3->T4 and T5->T6 can be any order but should maintain WR dependency means after T1 T2 only come.

so,  T1->T2 and T3->T4 and T5->T6  1st order

T1->T2 , T5->T6  , T3->T4              2nd order

T5->T6  T3->T4    T1->T2       3rd order

  T3->T4  T5->T6   T1->T2    4th order

T5->T6  T1->T2   T3->T4   5th order

T3->T4  T1->T2  T5->T6  6th order

in this 6 way we can  make all view equivalent serial schedules.

selected by
13 votes
13 votes

 

according to view equivalence definition 

1)  any write by Ti  followed by read by Tj , the same condition should be followed 

2) last operation on some item should be same in view equivalence schedule.

 all writes are blind writes in the given question.

last write on A is W7(A) . and it should be followed by R8(A).  this sequence should be always appear at the end in any euivalence schedule.

remaining  1. W1(A) should be follwed by R2(A) 

                2. W3(A) should be followed by R4(A)

                3. W5(A) should be follwed by R6(A)

these 3 sequences can appear any order so = 3! = 6 

please correct me if any mistake.

 

5 votes
5 votes

First of all thanks to Bikram Sir for clearing my doubt and giving me source for it.

So, I solved it using Polygraph Method, which may easy to understand.

First Image: Illustration of Polygraph Method by example

Second Image: Solution of Both Questions(including https://gateoverflow.in/36024/how-many-view-equivalent-serial-schedules-are-possible)

Sir, can you please check my Polygraphs and correct me!

–1 votes
–1 votes

there would no view serializable of above. as any other  serial serial would nt satisfy the read write condition as stated in view serializabilty property that IF T2 writes and T3 reads it must be same in other schedules.here as each T is doing just R or W, THIS PROPERTY IS FORCED ON THEM as if we swap the transaction to anothr serial schedules THE PROPERTY FORCED ON THE ABOVE SCHEDULE WILL NOT BE OBEYED.HENCE THERE WOULD BE NO VIEW SERIALIZABLE SCHEDULES. but i am not    100 % sure .. but i am quite confident ..

Answer:

Related questions

1 votes
1 votes
0 answers
4
sumit goyal 1 asked Jan 22, 2018
583 views
R (A1, A2, ….An) and every (n-2) attributes of R forms a candidate key. How many superkeys are there in R?answer = $_{n-2}^{n}\textrm{C} + n +1$iam not getting how to a...