GATE CS 2025 Set 2 | Question 53

Databases › Transaction Management · MSQ · 2 marks · Answer: B

  1. Question 53Databasesmsq2 marks
    Transactions T1: R1(X) W1(Y) R1(X) W1(X) COMMIT, and T2: W2(X) W2(Y) COMMIT, over data items X, Y. Which of the schedule(s) is/are conflict serializable?
    • A.
      R1(X), W2(X), W1(Y), W2(Y), R1(X), W1(X), COMMIT(T2), COMMIT(T1)
    • B.
      W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)
      ✓
    • C.
      R1(X), W1(Y), W2(X), W2(Y), R1(X), W1(X), COMMIT(T1), COMMIT(T2)
    • D.
      W2(X), R1(X), W1(Y), W2(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

    Answer: B

    Solution

    Answer: (B) Build the precedence (serialization) graph for each schedule; conflict serializable iff it is acyclic. - (B): W2(X) before R1(X) and before W1(X) → ; W2(Y) before W1(Y) → . No conflict puts before . Graph has only → acyclic → conflict serializable (order ). ✓ - (A): R1(X) before W2(X) gives , while W2(X) before later W1(X) gives → cycle. Not serializable. - (C): W1(Y) before W2(Y) gives , and W2(X) before W1(X) gives → cycle. Not serializable. - (D): W2(X) before R1(X) gives , and W1(Y) before W2(Y) gives → cycle. Not serializable.

More GATE PYQ on Transaction Management

All GATE CS Databases PYQ →

Attempt GATE CS 2025 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →