GATE 2025 CS (CS2) – Question 53
Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable?
Transaction T1: R1(X), W1(Y), R1(X), W1(X), COMMIT(T1)
Transaction T2: W2(X), W2(Y), COMMIT(T2)
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)
Explanation
In B, every conflict is ordered T2 → T1, so the precedence graph is acyclic. In A both T1→T2 (R1(X) before W2(X)) and T2→T1 (W2(X) before the second R1(X)) occur. C and D also have edges in both directions, so they contain cycles.