reset password
Author Message
victormejia
Posts: 40
Posted 16:32 Dec 07, 2010 |

I am a little confused. For 4 (a), according to the precedence graph, the schedule should not be serializable. However, the end results for that are:

b1 written by T1
b2 written by T1
b3 written by T2
b4 written by T2


If we have the schedule T1T2

w1(b2),w1(b1),r1(b2),w1(b1),r1(b3),w1(b3),r1(b4),r2(b2),r2(b3),r2(b1),w2(b3),r2(b4),w2(b4)


Then the results are:

b1 written by T1
b2 written by T1
b3 written by T2
b4 written by T2


so it is serializable to schedule T1T2. Why do they contradict?

cysun
Posts: 2935
Posted 16:39 Dec 07, 2010 |

Serializability is not just about what's written to the blocks in the end - the data read also matters. For example, if T1 reads from T2 and T2 reads from T1, then it's not serializable.