CS FundamentalsHardGATE CS

In a wait-for graph the edges are T1 → T2, T2 → T3, T3 → T1, T3 → T4 and T5 → T2. What is the minimum number of transactions that must be aborted to break every deadlock?

  1. A. 0, because T4 can finish
  2. B. 1
  3. C. 2
  4. D. 3

Correct answer: B. 1

The only cycle is T1 → T2 → T3 → T1, and aborting any one of those three breaks it. T4 is not in the cycle, and T5 merely waits on T2; it is blocked but not deadlocked.

More DBMS and SQL questions

Exams that ask this topic