CS FundamentalsModerateGATE CS · DBMS

In a wait-for graph, T1 waits for T2, T2 waits for T3, T3 waits for T4 and T4 waits for T2. T5 waits for T1. Which transactions are deadlocked (part of a cycle)?

  1. A. T2, T3 and T4 only
  2. B. None — a deadlock needs exactly two transactions
  3. C. All five transactions
  4. D. T1, T2, T3 and T4

Correct answer: A. T2, T3 and T4 only

The only cycle is T2 → T3 → T4 → T2. T1 and T5 are blocked behind it but not in the cycle; aborting a cycle member (say T4) frees them.

More DBMS and SQL questions

Exams that ask this topic