GateAI
Transactions and Concurrency Control

GATE CSE 2022 · Q39

MCQ2 marksMedium

Time

Let Ri(z)R_i(z) and Wi(z)W_i(z) denote read and write operations on a data element zz by a transaction TiT_i, respectively. Consider the schedule SS with four transactions. SS: R4(x)R2(x)R3(x)R1(y)W1(y)W2(x)W3(y)R4(y)R_4(x)R_2(x)R_3(x)R_1(y)W_1(y)W_2(x)W_3(y)R_4(y) Which one of the following serial schedules is conflict equivalent to SS?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) T1 → T3 → T4 → T2

Transactions and Concurrency Control

To find the conflict equivalent serial schedule, we identify all conflicting operation pairs (operations on the same data item by different transactions, where at least one is a write) in schedule SS:

S:R4(x)  R2(x)  R3(x)  R1(y)  W1(y)  W2(x)  W3(y)  R4(y)S: R_4(x) \; R_2(x) \; R_3(x) \; R_1(y) \; W_1(y) \; W_2(x) \; W_3(y) \; R_4(y)
  1. Conflicts on xx:

    • R4(x)R_4(x) occurs before W2(x)  ⟹  T4→T2W_2(x) \implies T_4 \rightarrow T_2

    • R3(x)R_3(x) occurs before W2(x)  ⟹  T3→T2W_2(x) \implies T_3 \rightarrow T_2

  2. Conflicts on yy:

    • R1(y)R_1(y) occurs before W3(y)  ⟹  T1→T3W_3(y) \implies T_1 \rightarrow T_3

    • W1(y)W_1(y) occurs before W3(y)  ⟹  T1→T3W_3(y) \implies T_1 \rightarrow T_3

    • W1(y)W_1(y) occurs before R4(y)  ⟹  T1→T4R_4(y) \implies T_1 \rightarrow T_4

    • W3(y)W_3(y) occurs before R4(y)  ⟹  T3→T4R_4(y) \implies T_3 \rightarrow T_4

  3. Precedence Graph Edges:

    • T1→T3T_1 \rightarrow T_3

    • T3→T4T_3 \rightarrow T_4

    • T4→T2T_4 \rightarrow T_2

    • (along with T1→T4T_1 \rightarrow T_4 and T3→T2T_3 \rightarrow T_2, which are consistent with this order)

Performing a topological sort on this acyclic graph gives the unique serial order:

T1→T3→T4→T2T_1 \rightarrow T_3 \rightarrow T_4 \rightarrow T_2

Thus, option (A) is the conflict equivalent serial schedule.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Transactions and Concurrency Control previous year question is Q39 of the GATE CSE 2022 paper. Find more GATE CSE PYQs on Transactions and Concurrency Control in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Transactions and Concurrency Control PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Transactions and Concurrency Control in GATE CSE

Transactions and Concurrency Control has 25 GATE CSE PYQs across 20 papers from 2012 to 2026. 12 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2022.

How GATE tests Transactions and Concurrency Control

More from GATE CSE 2022

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2022 · Q39 · MCQ

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

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.