The GATE Grind

GATE 2024 CS (CS1) – Question 46

Databases · Transactions and Concurrency Control · 2 marks · Multiple select

Consider the read-write schedule $S$ over three transactions $T_1,T_2,T_3$: $S: r_1(z); w_1(z); r_2(x); r_3(y); w_3(y); r_2(y); w_2(x); w_2(y);$. Which of the following transaction schedules is/are conflict equivalent to $S$?

  1. $T_1T_2T_3$
  2. $T_1T_3T_2$
  3. $T_3T_2T_1$
  4. $T_3T_1T_2$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) $T_1T_3T_2$; (D) $T_3T_1T_2$

Explanation

Conflicts exist only on y: T3 (r3,w3) precedes T2 (r2,w2), giving T3→T2. T1 touches only z so it is unconstrained. Valid serial orders have T3 before T2: T1T3T2 and T3T1T2.