Skip to content
GATEiit

GATE CSE 2021 Set 1 Q42: Conflict serializability of two two-transaction schedules

Question

Let ri(z)r_i(z) and wi(z)w_i(z) denote read and write operations respectively on a data item zz by a transaction TiT_i. Consider the following two schedules.

S1:  r1(x) r1(y) r2(x) r2(y) w2(y) w1(x)S_1: \; r_1(x)\, r_1(y)\, r_2(x)\, r_2(y)\, w_2(y)\, w_1(x)

S2:  r1(x) r2(x) r2(y) w2(y) r1(y) w1(x)S_2: \; r_1(x)\, r_2(x)\, r_2(y)\, w_2(y)\, r_1(y)\, w_1(x)

Which one of the following options is correct?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2021 final answer key)

Concept used: A schedule is conflict serializable exactly when its precedence graph has no cycle.

First step: In S1S_1, r1(y)r_1(y) before w2(y)w_2(y) gives T1→T2T_1 \to T_2, and r2(x)r_2(x) before w1(x)w_1(x) gives T2→T1T_2 \to T_1. Do the same for S2S_2.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2021 Set 1 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key