Timestamp-Ordering Protocol: Suppose That Transaction Ti Issues Read (Q)
Timestamp-Ordering Protocol: Suppose That Transaction Ti Issues Read (Q)
The timestamp-ordering protocol ensures that any conflicting read and write operations are executed in
timestamp order. This protocol operates as follows:
If a transaction Ti is rolled back by the concurrency-control scheme as result of issuance of either a read or
write operation, the system assigns it a new timestamp and restarts it.
To illustrate this protocol, we consider transactions T25 and T26. Transaction T25 displays the contents of
accounts A and B:
1. If TS(Ti ) < R-timestamp(Q), then the value of Q that Ti is producing was previously needed, and it had
been assumed that the value would never be produced. Hence, the system rejects the write operation and
rolls Ti back.
2. If TS(Ti ) < W-timestamp(Q), then Ti is attempting to write an obsolete value of Q. Hence, this write
operation can be ignored.
3. Otherwise, the system executes the write operation and setsW-timestamp(Q) to TS(Ti ).