Author | Message |
---|---|
Gayaneh
Posts: 40
|
Posted 07:42 Mar 11, 2013 |
Quesitons f) and g Timestamp concurrency control without/with the Thomas Write Rule Does anybody ever reach to the point for that you have to use those rules? The conditions that I have in both cases(i.e. S1 and S2) used the other options for validation. Just I want to make sure if my resolution is right or wrong? Thanks! |
hpguo
Posts: 139
|
Posted 23:27 Mar 11, 2013 |
Sorry, I have no idea what your question is. |
Gayaneh
Posts: 40
|
Posted 13:17 Mar 13, 2013 |
I initialize Timestamps for X, Y, Z first to Zero . Timestamps for T1, T2, T3 is set to 1,2,3 respectively. We have these sequences Sequence S1: T1: R(X), T1: W(Y), T2:R(Z), T1:Commit, T3: R(X), T3:W(X), T3:Commit, T2: W(Y), T2:W(Z), T2: Commit Sequence S2: T1:R(X), T3:R(Y), T3:W(X), T2:R(Z), T2:W(Y), T1:W(Z), T1:Commit, T3:Commit, T2:Commit
In Sequence S1 all Writes are being allowed, (condition TS(T) > WTS(O) is true) In Sequence S2 We have these writes: T3:W(x) , for which TS(T) > WTS(O) and TS(T) > RTS(O), so write will be allowed. (3>1 & 3>0) T2:W(Y) is Aborted because: TS(T) < RTS(O) (first condition), and TS(T) > WTS(O), so we never get to the second condition that Thomas Write Rule can be applied. I checked my resolution many times and I think I did it write. With thanks. -Gayaneh
|