GATE / CS ARCHIVE

GATE CSE 2025 SET 2 / QUESTION 53

GATE CSE 2025 Set 2 Q53

Database Management Systems · Transactions & Concurrency Control · Full GATE CSE 2025 Set 2 paper

GATE 2025 Set 2, Q53 2 marks · MSQ
Report issue

Transactions & Concurrency Control

Question 53, GATE 2025: R_i(V) and W_i(V) denote transaction i reading/writing item V; C_i is its commit. Select all conflict-serializable schedules.
A. R1(X),W2(X),W1(Y),W2(Y),R1(X),W1(X),C2,C1.
B. W2(X),R1(X),W2(Y),W1(Y),R1(X),C2,W1(X),C1.
C. R1(X),W1(Y),W2(X),W2(Y),R1(X),W1(X),C1,C2.
D. W2(X),R1(X),W1(Y),W2(Y),R1(X),C2,W1(X),C1.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B

Step through it (4 schedules)

Construct a precedence graph with vertices T1,T2. Two operations conflict when they are in different transactions, access the same item, and at least one is a write. An earlier conflicting operation from Ti followed by one from Tj creates edge Ti→Tj. The schedule is conflict-serializable exactly when this graph is acyclic.

In A, the first R1(X) precedes W2(X), giving T1→T2. The later R1(X), and also W1(X), follow W2(X), giving T2→T1. There is a cycle. C has the same two conflicting directions on X, so it also fails.

In B, W2(X) precedes both reads and the write of X by T1. On Y, W2(Y) precedes W1(Y). Thus all intertransaction conflicts point T2→T1; there is no reverse edge. This is conflict-equivalent to serial order T2 followed by T1.

In D, the X conflicts point T2→T1, but W1(Y) precedes W2(Y), adding T1→T2 and creating a cycle. Commit positions do not remove conflicts or make a cyclic precedence graph acyclic. Select B only. Conflict serializability is a property distinct from whether an interleaving satisfies a particular recovery or locking protocol.

Original paper, page 41 · Answer key