GATE / CS ARCHIVE

GATE CSE 2007 / QUESTION 64

Conflict serializability of two schedules

Database Management Systems · Transactions & Concurrency Control · Full GATE CSE 2007 paper

GATE 2007, Q64 2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 64, GATE 2007: For two transactions, consider schedules S1: r1(X);r1(Y);r2(X);r2(Y);w2(Y);w1(X) and S2: r1(X);r2(X);r2(Y);w2(Y);r1(Y);w1(X). Which are conflict serializable?
Options:
(A) Both
(B) S1 only
(C) S2 only
(D) Neither
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step through it (2 schedules)

1. Approach. Create a precedence edge only between different transactions on the same item when at least one access is a write. Read–read pairs do not conflict. A cycle is exactly the obstruction to conflict serializability.

2. Derivation and interpretation. In S1, r1(Y) precedes w2(Y), producing T1 -> T2, while r2(X) precedes w1(X), producing T2 -> T1. The cycle prevents conflict serializability. In S2, w2(Y) precedes r1(Y) and r2(X) precedes w1(X), both giving T2 -> T1; there is no reverse edge. S2 is equivalent to serial order T2,T1. Thus C.

Original paper, page 16