Skip to content
Official PYQ · 2010

GATE CS 2010 Q20 — Transactions and Concurrency Control

Explain with AI

Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?

  1. 22-phase locking
  2. Time-stamp ordering
Choose one option
View worked solution

Answer: B

To determine which protocol ensures both conflict serializability and freedom from deadlock, let us analyze each protocol:

  1. I. 22-Phase Locking (2PL):
    • Conflict Serializability: Yes. The basic 2PL protocol guarantees that any schedule it generates is conflict serializable.
    • Freedom from Deadlock: No. Under 2PL, transactions acquire locks dynamically. If Transaction T1T_1 holds a lock on resource AA and waits for resource BB, while Transaction T2T_2 holds a lock on resource BB and waits for resource AA, a deadlock occurs. Thus, 2PL does not prevent deadlocks.
  2. II. Time-stamp Ordering (TO):
    • Conflict Serializability: Yes. The protocol uses transaction timestamps to decide the serialization order. Any conflicting operations are executed in the order of their timestamps.
    • Freedom from Deadlock: Yes. In the timestamp ordering protocol, transactions do not wait for each other by holding locks. If an operation violates the timestamp order, the transaction is immediately aborted and restarted with a new timestamp. Since there is no waiting, circular wait is impossible, ensuring absolute freedom from deadlock.

Therefore, only II (Time-stamp ordering) ensures both properties.

Correct Option: B (II only)

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Transactions and Concurrency Control questions