GateAI
Transactions and Concurrency Control

GATE CSE 2024 Set 1 · Q46

MSQ2 marksMedium

Time

Consider the following read-write schedule SS over three transactions T1T_1, T2T_2, and T3T_3, where the subscripts in the schedule indicate transaction IDs: S:r1(z);w1(z);r2(x);r3(y);w3(y);r2(y);w2(x);w2(y);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 SS ?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: B) T1 T3 T2; C) T3 T2 T1; D) T3 T1 T2

Transactions and Concurrency Control

To determine the serial schedules conflict equivalent to SS, we construct the precedence (serialization) graph by finding all pairs of conflicting operations (operations on the same data item by different transactions where at least one is a write):

  1. Operations on zz:

    • Only T1T_1 accesses zz (r1(z)r_1(z), w1(z)w_1(z)). There are no conflicts with other transactions involving data item zz.

  2. Operations on xx:

    • Only T2T_2 accesses xx (r2(x)r_2(x), w2(x)w_2(x)). There are no conflicts involving xx.

  3. Operations on yy:

    • T3T_3 has r3(y)r_3(y) and w3(y)w_3(y).

    • T2T_2 has r2(y)r_2(y) and w2(y)w_2(y).

    • In schedule SS, w3(y)w_3(y) precedes r2(y)r_2(y) and w2(y)w_2(y), which creates a conflict dependency from T3T_3 to T2T_2 (T3→T2T_3 \to T_2).

Thus, the only edge in the precedence graph is:

T3→T2T_3 \to T_2

T1T_1 has no edges connected to it, so any topological ordering must only satisfy that T3T_3 appears before T2T_2.

The valid topological sortings (conflict-equivalent serial schedules) of {T1,T2,T3}\{T_1, T_2, T_3\} are:

  • T1T3T2T_1 T_3 T_2 (Option B)

  • T3T1T2T_3 T_1 T_2 (Option D)

  • T3T2T1T_3 T_2 T_1 (Option C)

Option A (T1T2T3T_1 T_2 T_3) violates the precedence constraint T3→T2T_3 \to T_2. Hence, the correct options are B, C, and D.

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 Q46 of the GATE CSE 2024 Set 1 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. 2 of them are 2-mark MSQs like this one, and it is the only one in GATE CSE 2024 Set 1.

How GATE tests Transactions and Concurrency Control

More from GATE CSE 2024 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2024 Set 1 · Q46 · MSQ

Consider the following read-write schedule S over three transactions T1, T2, and T3, where the subscripts in the schedule indicate transaction IDs: S: r1(z); w1(z); r2(x); r3(y); w3(y); r2(y); w2(x); w2(y); Which of the following transaction schedules is/are 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.