Given - Two transactions T1 and T2 with time-stamps 100 and 200, respectively.
Timestamp ordering rule says :
if ri (x) and wj (x) are conflicting operations then ri (x) is processed before wj (x) iff ts(Ti ) < ts(Tj )
This is the table for given schedule :
T1: timestamp value
|
T2 : timestamp value |
r1(A); 101 |
|
w1(A); 102 |
|
|
r2(A); 201 |
|
r2(B); 202 |
w1(B); 103 |
|
c1; |
|
|
w2(A); 203 |
|
c2; |
T1 is rolled back as it is committed before complete Write() operation of T2 , ..
1. Whenever a transaction T issues a write_item(X) operation, the following is checked:
a. If read_TS(X) > TS(T) or if write_TS(X) > TS(T), then abort and roll back T and reject the operation.
This should be done because some younger transaction with a timestamp greater than TS(T)— and hence after T in the timestamp ordering—has already read or written the value of item X before T had a chance to write X, thus violating the timestamp ordering.
2. Whenever a transaction T issues a read_item(X) operation, the following is checked:
a. If write_TS(X) > TS(T), then abort and roll back T and reject the operation. This should be done because some younger transaction with timestamp greater than TS(T)—and hence after T in the timestamp ordering—has already written the value of item X before T had a chance to read X.
Here Timestamp of T2 is 203 > Timestamp of T1 which is 103 so T is roll back .
Transaction T not satisfying any one of the Basic timestamp ordering protocol , Thomas Write Rule and Multi version Timestamp ordering protocol .
Hence only option B is true .