StreakPeaked· Practice

ExamsGATETechnical

Let R_i(z) and W_i(z) denote read and write operations on a data element z by a transaction T_i, respectively. Consider the schedule S with four transactions. S: R4(x)R2(x)R3(x)R1(y)W1(y)W2(x)W3(y)W4(y) Which one of the following serial schedules is conflict equivalent to S?

  1. T1 → T3 → T4 → T2
  2. T1 → T4 → T3 → T2
  3. T4 → T1 → T3 → T2
  4. T3 → T1 → T4 → T2

Correct answer: T1 → T4 → T3 → T2

Solution

The conflict edges from S are T1->T3, T1->T4, T3->T2, T3->T4, T4->T2, whose only topological order is T1->T3->T4->T2. Therefore the conflict-equivalent serial schedule is T1->T3->T4->T2, not T3->T1->T4->T2.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →