GATE / CS ARCHIVE

GATE CSE 2010 / QUESTION 42

Conflict-serializable schedule

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

GATE 2010, Q42 2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 42, GATE 2010: Transactions T1,T2,T3 execute this schedule, in time order: r1(X), r2(Y), r3(Y), w2(Y), w1(X), w3(X), r2(X), w2(X). Which serial order is equivalent to the schedule?
Options: (A) T1→T3→T2; (B) T2→T1→T3; (C) T2→T3→T1; (D) T3→T1→T2.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step through it (10 steps)

In time order the schedule is r1(X), r2(Y), r3(Y), w2(Y), w1(X), w3(X), r2(X), w2(X). Conflicts on X impose T1→T3, T1→T2 and T3→T2; r3(Y) before w2(Y) also imposes T3→T2. There is no reverse edge. Its unique topological ordering is T1→T3→T2, option A.

Two operations conflict only if they belong to different transactions, access the same item, and at least one is a write. Reads r2(Y) and r3(Y) do not themselves create an edge. However r3(Y) before w2(Y) creates T3→T2. A topological ordering of the resulting acyclic graph gives a conflict-equivalent serial execution; source-code transaction numbering alone does not determine that order.

Original paper, page 10