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?
- A. (a) T2 (b) T2
- B. (a) T1 (b) T1
- C. (a) T2 (b) T1
- 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
- TS(T1) = 7, TS(T2) = 3, TS(T3) = 9; all read/write timestamps start at 0. The schedule W2(A), R3(A), W1(A), W3(B), R1(B), W2(B) is run…
- TS(T1) = 5, TS(T2) = 10, TS(T3) = 15. T2 holds an exclusive lock on X; then T1 and T3 each request X. What happens under wound-wait?
- T1 and T2 run the schedule R1(A), W2(A), R1(B), C1, C2, and each transaction may acquire any lock as early as it likes. Under which…
- Under snapshot isolation, x = 50 and y = 50 with the rule x + y ≥ 0. T1 reads x and y and, if x + y ≥ 100, sets x = x − 100. T2…
- How many of these statements are correct? (i) Under multiversion timestamp ordering, a read request is never rejected. (ii) Thomas' write…
- During ARIES restart, the analysis pass rebuilds a dirty page table with entries P1 (recLSN 140), P2 (recLSN 95) and P3 (recLSN 210). The…