Thomas write rule

From Wikipedia, the free encyclopedia

In computer science, in the field of databases, the Thomas Write rule is a rule in timestamp-based concurrency control.

Given a Timestamp on a transaction T, TS(T) and Write Timestamp on an object O, WTS(O):

It states if TS(T) < WTS(O), the current write action has been made obsolete by the most recent write of O, which follows the current write according to timestamp ordering.

Given a non-conflict serializable transaction schedule:

\begin{bmatrix}
T1 & T2 \\
R(A) &   \\
 &W(A)   \\
& Com.   \\
W(A) &  \\
Com. & \end{bmatrix}

Text: T1:R(A), T2:W(A), T2 Commit, T1: W(A), T1 Commit.

The Thomas Write Rule relies on the fact that T1's write on object A is never seen by any transaction and postulates that the schedule above is equivalent to the schedule below where T2 occurs strictly after T1, and that hence the write of T1 can be ignored:

\begin{bmatrix}
T1 & T2 \\
R(A) &   \\
W(A) &  \\
Com. & \\
 & W(A) \\
 & Com. \end{bmatrix}

Text: T1:R(A), T1: W(A), T1 Commit, T2:W(A), T2 Commit.

This schedule has the same effect as the first and is conflict serializable.

[edit] References

Robert H. Thomas (1979). "A majority consensus approach to concurrency control for multiple copy databases". ACM Transactions on Database Systems 4 (2): 180-209. doi:10.1145/320071.320076. 


Languages