Which of the following concurrency protocol ensues both conflict…
2015
Which of the following concurrency protocol ensues both conflict serializability and freedom from deadlock ?
(a) 2-phase locking
(b) Time phase ordering
- A.
Both (a) & (b)
- B.
(a) only
- C.
(b) only
- D.
Neither (a) nor (b)
Attempted by 136 students.
Show answer & explanation
Correct answer: C
Answer: Time phase ordering (timestamp ordering) is the correct choice.
Why two-phase locking does not guarantee freedom from deadlock:
Two-phase locking enforces conflict serializability by having transactions acquire locks in a growing phase and release them in a shrinking phase.
However, because transactions can block while waiting for locks held by others, wait cycles can form and cause deadlocks unless extra measures (like deadlock detection or prevention) are used.
Why time-phase (timestamp) ordering satisfies both properties:
Each transaction is assigned a unique timestamp that determines a global ordering.
Read/write operations are checked against object read/write timestamps so that conflicting operations respect the timestamp order; if an operation would violate the order, the protocol aborts or restarts the offending transaction rather than making it wait.
Because transactions are never made to wait for locks held by others, there are no waiting cycles, so the protocol is deadlock-free, and the enforced order yields conflict serializability.
Conclusion: The timestamp-based (time-phase) ordering protocol is both conflict-serializable and free from deadlock, so it is the correct answer.