CS FundamentalsVery hardGATE CS (PYQ pattern)
Transaction T1 executes R1(A), W1(A), R1(B) and T2 executes W2(A), R2(B), W2(B), each in the stated order (no commits modelled). Among all possible interleavings of the six operations, how many are conflict-serializable?
- A. 13
- B. 9
- C. 6
- D. 2
Correct answer: B. 9
There are C(6,3) = 20 interleavings. On item A, R1(A) and W1(A) conflict with W2(A); on item B only R1(B) conflicts with W2(B) (R2(B) and R1(B) do not conflict). A schedule is serializable exactly when all conflicts point the same way; counting those gives 9.
More DBMS and SQL questions
- Consider the schedule R2(X), W1(X), W2(X), W2(Y), C2, R1(Y), C1, W3(X), R3(X), C3 (Ci is the commit of Ti). Which is the strongest…
- Schedule S: R1(X), W2(X), W2(Y), W1(Y), W3(X), W3(Y), R3(Y). Which statement is correct?
- Basic timestamp ordering with TS(T1) < TS(T2) < TS(T3). A transaction aborts when it violates the rules, and once aborted its later…
- A system uses immediate database modification with a log. Log (oldest first): <T1 start>, <T1,A,10,20>, <T2 start>, <T2,B,5,6>, <T1…
- A 10,000-page file is sorted by external merge sort with 21 buffer pages: later passes merge 20 runs at a time, and every pass reads and…
- Block nested-loop join of R (800 pages) and S (300 pages) with 52 buffer pages (1 for the inner input, 1 for output, 50 for the outer…