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?
- A. T2
- B. T1, T2
- C. T2, T4
- 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
- An extendible hash index has bucket capacity 2 and uses the low-order bits of the integer key as the hash value (the directory starts with…
- A file of 32,000 pages is sorted with an external merge sort using 32 buffer pages: pass 0 produces sorted runs of 32 pages, and every…
- ARIES log: LSN1 T1 update P1; LSN2 T2 update P2; LSN3 T1 update P3; LSN4 begincheckpoint; LSN5 endcheckpoint with active transactions {T1…
- Sa(m, amt) holds monthly sales (2024-01, 100), (2024-02, 130), (2024-03, 130), (2024-04, 90), (2024-05, 150), (2024-06, 150), (2024-07…
- Table T(x) holds the values 1, NULL, 3, NULL, 3. What does SELECT COUNT(), COUNT(x), COUNT(DISTINCT x) FROM T return?
- Emp(n, dept, sal) has rows (A, d1, 40), (B, d1, 70), (C, d2, 45), (D, d2, 50), (E, d3, 80), (F, d3, 30), (G, d4, 60). How many rows does…