GateAI
Transactions and Concurrency Control

GATE CSE 2014 Set 1 · Q29

MCQ2 marksMedium

Time

Consider the following four schedules due to three transactions (indicated by the subscript) using readread and writewrite on a data item xx, denoted by r(x)r(x) and w(x)w(x) respectively. Which one of them is conflict serializable?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) r2 (x) ; w2 (x) ; r3 (x) ; r1 (x) ; w1 (x)

Transactions and Concurrency Control

To check for conflict serializability, we construct the precedence (serialization) graph for each schedule and check for cycles:

  1. Option (A): $r_1(x) ; r_2(x) ; w_1(x) ; r_3(x) ; w_2(x)$

    • Conflict between r2(x)r_2(x) and w1(x)w_1(x) gives edge T2→T1T_2 \to T_1.

    • Conflict between w1(x)w_1(x) and w2(x)w_2(x) gives edge T1→T2T_1 \to T_2.

    • There is a cycle between T1T_1 and T2T_2. Hence, it is not conflict serializable.

  2. Option (B): $r_2(x) ; r_1(x) ; w_2(x) ; r_3(x) ; w_1(x)$

    • Conflict between r1(x)r_1(x) and w2(x)w_2(x) gives edge T1→T2T_1 \to T_2.

    • Conflict between w2(x)w_2(x) and w1(x)w_1(x) gives edge T2→T1T_2 \to T_1.

    • There is a cycle between T1T_1 and T2T_2. Hence, it is not conflict serializable.

  3. Option (C): $r_3(x) ; r_2(x) ; r_1(x) ; w_2(x) ; w_1(x)$

    • Conflict between r1(x)r_1(x) and w2(x)w_2(x) gives edge T1→T2T_1 \to T_2.

    • Conflict between w2(x)w_2(x) and w1(x)w_1(x) gives edge T2→T1T_2 \to T_1.

    • There is a cycle between T1T_1 and T2T_2. Hence, it is not conflict serializable.

  4. Option (D): $r_2(x) ; w_2(x) ; r_3(x) ; r_1(x) ; w_1(x)$

    • Conflict between w2(x)w_2(x) and r3(x)r_3(x) gives edge T2→T3T_2 \to T_3.

    • Conflict between w2(x)w_2(x) and r1(x)r_1(x) gives edge T2→T1T_2 \to T_1.

    • Conflict between w2(x)w_2(x) and w1(x)w_1(x) gives edge T2→T1T_2 \to T_1.

    • Conflict between r3(x)r_3(x) and w1(x)w_1(x) gives edge T3→T1T_3 \to T_1.

    • The graph has directed edges T2→T3T_2 \to T_3, T2→T1T_2 \to T_1, and T3→T1T_3 \to T_1, which contains no cycles.

Thus, schedule (D) is conflict serializable with the equivalent serial order T2→T3→T1T_2 \to T_3 \to T_1.

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

How GATE tests Transactions and Concurrency Control

More from GATE CSE 2014 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2014 Set 1 · Q29 · MCQ

Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable?

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.