reset password
Author Message
layla08
Posts: 70
Posted 12:30 Jun 04, 2016 |

Hi Dr. Sun,

You went over a Multiversion example in class:

T1: w1(b1), w2(b2)

T4: w4(b1), w4(b2)

T3: r3(b1), r3(b2)

Schedule: w1(b1), w2(b2), c1, r3(b1), w4(b1), w4(b2), c4, r3(b2)

I understand why r3(b1) and r3(b2) both read from the versions at T1. That's clear. 

Also, when I draw out a precedence diagram for the schedule, it's acyclic/serializable as it should be since multiversion ensures serializability. 

However, I don't understand why T1 T4 T3 and T1 T3 T4 were used as examples of non-serializable schedules. What exactly did you mean by that?

Thanks for your time!

cysun
Posts: 2935
Posted 13:04 Jun 04, 2016 |

The example was to show why T3 should not read the b2 written by T4 even though T4 was committed before r3(b2). If T3 read the b2 written by T4, then the results would be different from any serial schedule (e.g. T1 T4 T3 and T1 T3 T4), so the schedule would be non-serializable. 

layla08
Posts: 70
Posted 13:17 Jun 04, 2016 |

Okay I understand now that you were saying an incorrect read by r3 (b2) would be nonserializable. Thank you for the quick response!

layla08
Posts: 70
Posted 13:23 Jun 04, 2016 |

One follow up question: the precedence graph for if r3 (b2) incorrectly reads from T4 should be cyclical then since its nonserializable. I'm not getting that when I try to draw it out. Which nodes form a loop?

Thanks again.

cysun
Posts: 2935
Posted 13:24 Jun 04, 2016 |
layla08 wrote:

One follow up question: the precedence graph for if r3 (b2) incorrectly reads from T4 should be cyclical then since its nonserializable. I'm not getting that when I try to draw it out. Which nodes form a loop?

Thanks again.

r3(b1) -> w4(b1), w4(b2) -> r3(b2)

layla08
Posts: 70
Posted 13:37 Jun 04, 2016 |
cysun wrote:
layla08 wrote:

One follow up question: the precedence graph for if r3 (b2) incorrectly reads from T4 should be cyclical then since its nonserializable. I'm not getting that when I try to draw it out. Which nodes form a loop?

Thanks again.

r3(b1) -> w4(b1), w4(b2) -> r3(b2)

I understand now!! Thank you!