CS FundamentalsVery hardGATE CS (PYQ pattern)
T1 executes W1(A), C1 and T2 executes R2(A), W2(B), C2, each in the stated order. Among all interleavings of the five operations, how many are recoverable, how many avoid cascading aborts, and how many are strict (in that order)?
- A. 9, 9, 7
- B. 10, 7, 7
- C. 8, 7, 8
- D. 9, 7, 7
Correct answer: D. 9, 7, 7
There are C(5,2) = 10 interleavings. A schedule is recoverable unless T2 reads A after W1(A) and commits before T1; it avoids cascading aborts unless R2(A) occurs between W1(A) and C1; strictness here coincides with ACA (no overwrite of A happens). Counting gives 9, 7, 7.
More DBMS and SQL questions
- Strict two-phase locking with shared locks for reads and exclusive for writes (a transaction already holding S can upgrade to X only if no…
- Transactions T1..T5 have timestamps equal to their numbers (T1 is oldest). Seven independent lock conflicts occur, written (requester…
- Log (LSN: record): 1: T1 update P1; 2: T2 update P2; 3: T1 update P3; 4: begincheckpoint, whose endcheckpoint records ATT = {T1, T2} and…
- Log (LSN: record): 1: T1 update P1; 2: T2 update P2; 3: T1 update P3; 4: begincheckpoint, whose endcheckpoint records ATT = {T1, T2} and…
- A system uses UNDO-only logging; log records <T,item,old value> hold the value BEFORE the update. Log: <T1 start>, <T1,A,10>, <T2 start>…
- T1: R1(X), W1(Y), C1 and T2: W2(X), R2(Y), C2. Of all interleavings, let s be the number that are strict schedules (no read or write of an…