Transactions & Concurrency Control

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.









