StreakPeaked· Practice

ExamsGATETechnical

A schedule of three database transactions T1, T2, and T3 is shown. Ri(A) and Wi(A) denote read and write of data item A by transaction Ti, i = 1,2,3. The transaction T1 aborts at the end. Which other transaction(s) will be required to be rolled back? R1(X) W1(Y) R2(X) R2(Y) R3(Y) ABORT(T1)

  1. Only T2
  2. Only T3
  3. Both T2 and T3
  4. Neither T2 nor T3

Correct answer: Both T2 and T3

Solution

T1 writes Y then aborts. T2 reads Y (R2(Y)) after W1(Y), a dirty read, so T2 must roll back. T3 also reads Y (R3(Y)) which carries T1's uncommitted value, so T3 must roll back too. Both T2 and T3 are rolled back.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →