Let $r_i(z)$ and $w_i(z)$ denote read and write operations respectively on a data item $z$ by a transaction $T_i$. Consider the following two schedules. $S_1$: $r_1(x)\ r_1(y)\ r_2(x)\ r_2(y)\ w_2(y)\ w_1(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?
$S_1$ is conflict serializable, and $S_2$ is not conflict serializable.
$S_1$ is not conflict serializable, and $S_2$ is conflict serializable.
Correct answer: (B) $S_1$ is not conflict serializable, and $S_2$ is conflict serializable.
Explanation
In $S_1$: r1(y) before w2(y) gives T1->T2, and r2(x) before w1(x) gives T2->T1, a cycle. In $S_2$: r1(y) comes after w2(y) giving T2->T1, and r2(x) before w1(x) also gives T2->T1, no cycle.
More Transactions and Concurrency Control questions
GATE 2020 CS Q47– Consider a schedule of transactions T 1 and T 2. In time order (RX = Read(X), WX =…
GATE 2019 CS Q21– Consider the following two statements about database transaction schedules: I. Strict…
GATE 2016 CS (CS1) Q32– Which one of the following is NOT a part of the ACID properties of database transactions?
GATE 2016 CS (CS1) Q61– Consider the following two phase locking protocol. Suppose a transaction T accesses (for…
GATE 2017 CS (CS1) Q52– In a database system, unique timestamps are assigned to each transaction using Lamport's…
GATE 2014 CS (CS1) Q39– Three transactions read and write item x using rᵢ and wᵢ. Which schedule is conflict…