Which of the following concurrency control protocols ensure both conflict…
2024
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock? (I) 2PL (Two Phase Lock) (II) Time-Stamp ordering (III) Multiple granularity protocol
- A.
I only
- B.
II only
- C.
III only
- D.
I and II both
Attempted by 135 students.
Show answer & explanation
Correct answer: B
Concept
A concurrency-control protocol is judged on two independent guarantees. Conflict serializability means every allowed schedule is equivalent to some serial order of the transactions. Deadlock freedom means no set of transactions can ever end up in a circular wait, each holding a resource the next needs. A protocol qualifies here only if it guarantees BOTH at once.
Applying it to each protocol
2PL (Two-Phase Locking): the growing-then-shrinking lock discipline forces conflict serializability, but because transactions hold locks and wait for one another, two transactions can each wait on a lock the other holds — a circular wait. So 2PL gives serializability but NOT deadlock freedom.
Timestamp Ordering: each transaction gets a fixed timestamp and conflicting operations are admitted only in timestamp order, with a violating transaction aborted and restarted rather than made to wait. Ordering by timestamp guarantees conflict serializability, and because no transaction ever waits on a lock there is no circular wait — so it gives serializability AND deadlock freedom.
Multiple Granularity: this is a layered locking technique (intention locks over a hierarchy) that improves lock-management efficiency. It is still lock-based, so the same circular-wait possibility as ordinary locking remains; it does not guarantee deadlock freedom.
Result
Only Timestamp Ordering satisfies both properties simultaneously, so the protocol set is exactly {II}.
Cross-check
A quick consistency test: any purely lock-based scheme (2PL, multiple granularity) keeps the possibility of waiting cycles, so it cannot be deadlock-free by itself; a no-wait scheme that resolves conflicts by abort-and-restart (timestamp ordering) removes waiting entirely and is deadlock-free. That rule alone selects timestamp ordering as the single qualifying protocol.