CS FundamentalsVery hardGATE CS

Basic timestamp ordering assigns timestamps TS(T1) < TS(T2) < TS(T3) < TS(T4) = 1, 2, 3, 4. For a data item Q, R(Q) is rejected if TS(T) < W-timestamp(Q), otherwise R-timestamp(Q) = max(R-timestamp, TS(T)); W(Q) is rejected if TS(T) < R-timestamp(Q) or TS(T) < W-timestamp(Q); once a transaction is rejected it is aborted and its later operations are ignored (the effects of aborted writes on timestamps are not undone). For the schedule T1:W(A), T1:W(B), T3:W(C), T1:W(C), T3:W(B), T1:R(A), T2:R(B), T4:W(B), T4:W(A), T4:R(A), T3:R(C), T2:W(B), which transactions are aborted?

  1. A. T2
  2. B. T1, T2
  3. C. T2, T4
  4. D. T1, T2, T3

Correct answer: B. T1, T2

T1 aborts at W(C) because T3 has already written C (TS(T1) = 1 < W-timestamp(C) = 3), so its later R(A) is ignored. T2 aborts at R(B) because T3 has already written B (2 < 3), so its later W(B) is ignored. T3 and T4 find no conflicts, so the aborted set is [1, 2]. With the Thomas write rule T1's late write would just be skipped, leaving only T2 aborted.

More DBMS and SQL questions

Exams that ask this topic