GATE / CS ARCHIVE

GATE CSE 2014 SET 2 / QUESTION 29

GATE CSE 2014 Set 2 Q29

Database Management Systems · Transactions & Concurrency Control · Full GATE CSE 2014 Set 2 paper

GATE 2014 Set 2, Q29 2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 29, GATE 2014: Schedule S, in chronological order: T2 reads X; T3 writes X and commits; T1 writes X and commits; T2 writes Y, reads Z, and commits; T4 reads X, reads Y, and commits. Classify S. A conflict-serializable, not recoverable; B not conflict-serializable, recoverable; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (13 steps)

1. Set up the reasoning. Construct a precedence graph for conflicting operations on the same item, and separately inspect the commit order of transactions whose values are read. Serializability and recoverability are different tests.

2. Derive the result. Conflicts on X impose T2→T3→T1→T4, and Y adds T2→T4; the graph is acyclic. T2 reads initial X/Z; T4 reads X from already committed T1 and Y from already committed T2. Thus the schedule is both conflict-serializable and recoverable, C.

3. Check the interpretation. The graph order T2,T3,T1,T4 respects every conflict, including direct T2→T1 and T2→T4 edges. T4 reads only committed results, while T2 reads initial values, so there is no commit-before-writer recovery violation.

Original paper, page 36 · Answer key