CS FundamentalsVery hardGATE CS (PYQ pattern)
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 item written by a still-uncommitted transaction), r the number that are rigorous (strict, and also no write of an item read by a still-uncommitted transaction) and c the number that are conflict-serializable. What is (s, r, c)?
- A. (8, 2, 14)
- B. (7, 3, 14)
- C. (7, 2, 14)
- D. (2, 7, 14)
Correct answer: C. (7, 2, 14)
There are 20 interleavings of the 6 operations. Enumerating them gives s = 7, r = 2, c = 14. Rigorous is a subset of strict, which is not always a subset of conflict-serializable.
More DBMS and SQL questions
- A wait-for graph over T1..T5 has edges T1→T2, T2→T3, T3→T1, T2→T4, T4→T1, T3→T5, T5→T2, T4→T5. How many distinct simple directed cycles…
- Under snapshot isolation item X has committed versions (commit timestamp: value): 0: 10, 5: 20, 9: 30, 14: 40. A transaction reads the…
- T1: R1(X), W1(Y); T2: W2(X), W2(Y); T3: W3(X), W3(Y), R3(Y). Of all 210 interleavings, how many are view-serializable and how many are…
- TS(T1) < TS(T2) < TS(T3). T1: W1(A), R1(B); T2: R2(A), W2(B); T3: W3(A), W3(B). Of all 90 interleavings, how many complete with NO abort…
- Multiversion timestamp ordering with TS(T1) < TS(T2) < TS(T3): a read of X returns the version with the largest write timestamp <= TS(T)…
- An equi-width histogram on column A (range 0 to 100, 10,000 rows) has buckets [0,20): 4000, [20,40): 2500, [40,60): 1500, [60,80): 1500…