Post your solutions to the Apr 18 In-Class Exercise Thread.
Best,
Chris
S -> R_S(X) -> W_S(X) -> C -> T -> W_T(X), RT(X) = TS(S), WT(X) = TS(S) T -> S -> R_T(X) -> C -> W_T(X)-Casey
(Edited: 2018-04-18)Let T and S be our transactions
S---Rs(X)---Ws(X)---Cs---T---Wt(X)
(RTime(X) = TS(S))
(WTime(X) = TS(S))
S---Rs(X)---Cs---T---U---Wu(X)---Wt(X)
(RTime(X) = TS(S))(Edited: 2018-04-18) 2.Start(S), RS(X), Start(T), Start(Z), WZ(X)
Elena
(Edited: 2018-04-18)Let there be two transactions T and U running concurrently (lowercase letters u and t beside R and W are subscript):<br /><br /> <u>1)</u> <Start U> --> <Ru(X)> --> <Wu(X)> --> <Commit U> --> <Start (T)> --> <Wt(X)> --> <Commit T> // When T starts, timestamp for both Read x and Read y are before transaction T has started.<br /><br /> <u>2)</u> <Start U> --> <Ru(X)> --> <Start T> --> <Wu(X)> --> <Commit U> --> <Wt(X)> --> <Commit T> // Wt(X) must occur after U commits so delay T until U is over.
(Edited: 2018-04-18)START(S), R_s(X), W_s(X), Commit, START(T), W_T(X)START(S), R_S(X), START(T), T_Z(X), W_Z(X), W_T(X)R_S(X), W_S(X), C_S, T starts, W_T(X) <br>R_S(X), C_S, T starts, W_T(X), C_T