843 views
3 votes
3 votes
Is this schedule view serializable ??
R1(x),R1(y),W1(x),R2(y),W3(y),W1(x),R2(y)

2 Answers

Best answer
2 votes
2 votes

$\left ( \text{S is conflict serializable} \right ) \Rightarrow \left ( \text{S is view serializable} \right )$

So, check for the precedence graph of this scedule first :

$\Rightarrow$ NOT conflict serializable.

So, we need to check view serializability :

Because of the $T_2\rightarrow T_3$ and $T_3\rightarrow T_2$ conditions need to be satisfied at the same time, no view serial schedule possible.

selected by
3 votes
3 votes

For view serialisability we check the following :

a) Initial  and updated read of each variable should be done by same transaction for both the non serial schedule and view equal serial schedule..

b) Final write of each variable should also be satisfied..

Keeping in mind the above mentioned points , if we are able to get even a single view serial schedule we can conclude that the given schedule is view serialisable..

So keeping in mind the above points , we find :

Initial(unupdated) read is being performed by T1 , so T1 must come at first compulsorily..

Now there is a write - read pair of W3(Y) and R2(Y) ..From this it follows that T2 must follow T3 and no transaction should come in between as in that case there is a possiblity that the other transaction performs write which is read by T2 which is not desirable as it needs to read from T3 only..

Hence the only possible serial schedule is T1 : T3 : T2..But this is invalidated due to first read of y variable by T2 which is being updated by T3 in view equal serial schedule..

There is no issue of final write here as each of the variables written by exactly one transaction here..Final write would come into picture if there is write on the same variable by more than 1 transaction..

Thus our final view equal schedule for the above non serial schedule is not possible..

So the schedule is not view serialisable..

 

edited by

Related questions

3 votes
3 votes
2 answers
1
air1ankit asked Oct 9, 2017
580 views