GATE / CS ARCHIVE

GATE CSE 2022 / QUESTION 39

GATE CSE 2022 Q39

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

GATE 2022, Q39 2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 39, GATE 2022: With Ri(z),Wi(z) denoting transaction i's reads/writes, schedule S is R4(x),R2(x),R3(x),R1(y),W1(y),W2(x),W3(y),R4(y). Choose a conflict-equivalent serial order: A 1,3,4,2; B 1,4,3,2; C 4,1,3,2; D 3,1,4,2.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (10 steps)

Conflicts on x give T4→T2 and T3→T2. Conflicts on y give T1→T3, T1→T4 and T3→T4. Their topological order is T1, T3, T4, T2, option A. Read-read pairs add no edges.

The precedence graph can be drawn as T1→T3→T4→T2, with additional T1→T4 and T3→T2 edges. Each edge enforces the same relative ordering of conflicting operations in a serial schedule. Since this chain orders all four transactions, the topological order is unique.

Original paper, page 25 · Answer key