CS FundamentalsVery hardGATE CS

Timestamp ordering with Thomas's write rule: TS(T1) = 5, TS(T2) = 10, TS(T3) = 15, and all read/write timestamps start at 0. The operations arrive as W2(A), R3(B), W1(A), W1(B). What happens to T1?

  1. A. T1 completes; W1(A) is ignored as obsolete
  2. B. T1 is rolled back at W1(A) because a younger transaction wrote A
  3. C. T1 is rolled back at W1(B), after W1(A) was ignored
  4. D. T1 completes; W1(A) overwrites T2's value

Correct answer: C. T1 is rolled back at W1(B), after W1(A) was ignored

W1(A): W-ts(A) = 10 > 5 and R-ts(A) = 0, so Thomas's rule skips the outdated write. W1(B): R-ts(B) = 15 > 5, meaning a younger transaction already read B, so T1 must be rolled back. Basic TO (without Thomas) would have aborted at W1(A).

More DBMS and SQL questions

Exams that ask this topic