CS FundamentalsVery hardGATE CS

TS(T1) = 1, TS(T2) = 2, TS(T3) = 3; all read/write timestamps start at 0. The schedule R1(A), W3(A), W2(A), R2(B), W1(B) is run under timestamp ordering, and an aborted transaction's later operations are skipped. Which transaction is rolled back (a) under basic TO and (b) with Thomas' write rule?

  1. A. (a) T2 (b) T2
  2. B. (a) T1 (b) T1
  3. C. (a) T2 (b) T1
  4. D. (a) T1 (b) T2

Correct answer: C. (a) T2 (b) T1

Basic TO aborts T2 at W2(A) since WTS(A) = 3 > 2; R2(B) is then skipped, so W1(B) succeeds. With Thomas' rule W2(A) is just ignored, R2(B) runs and sets RTS(B) = 2, and then W1(B) with TS 1 < 2 aborts T1.

More DBMS and SQL questions

Exams that ask this topic