GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 2.6

Serializability of an interleaving

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

GATE 1999, Q2.6 2 marks · MSQ
Report issue

Transactions & Concurrency Control

Question 2.6, GATE 1999: Schedule: r1(A),r2(B),w1(A),r2(A),w2(A),w2(B),r1(B),w1(B). Is it serializable and/or possible under two-phase locking?
Tap to enlarge
Select all that apply
Answer & solution

Answer: D: neither (no official key was published)

Step through it (10 steps)

The A conflicts put transaction 1 before transaction 2: w1(A) precedes r2(A) and w2(A). The B conflicts put transaction 2 before transaction 1: w2(B) precedes r1(B) and w1(B). Hence the precedence graph has a directed cycle. It is not conflict serializable; even view equivalence fails because T2 reads A from T1 while T1 reads B from T2, requiring opposite serial orders. Two-phase locking guarantees conflict serializability, so it cannot produce this completed schedule. Thus D.

Original paper, page 4