GATE / CS ARCHIVE

GATE CSE 2010 / QUESTION 20

Serializability without deadlock

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

GATE 2010, Q20 1 mark · MCQ
Report issue

Transactions & Concurrency Control

Question 20, GATE 2010: Which concurrency-control protocols ensure both conflict serializability and freedom from deadlock? I: two-phase locking. II: timestamp ordering.
Options: (A) I only; (B) II only; (C) Both I and II; (D) Neither I nor II.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Two-phase locking guarantees conflict serializability but can create a cycle of transactions waiting for locks, so I does not guarantee deadlock freedom. Basic timestamp ordering enforces conflicts in timestamp order and rejects/aborts violating operations rather than making transactions wait on locks. It is conflict serializable and deadlock-free, although retries can still starve a transaction. Thus II only, B.

A simple 2PL deadlock is T1 holding lock X while requesting Y and T2 holding Y while requesting X; neither needs to violate the two-phase rule. Timestamp ordering instead disallows an operation inconsistent with the fixed transaction order. Deadlock freedom does not imply starvation freedom: repeated abort/restart of one transaction is still possible.

Original paper, page 5