Consider the transactions T1, T2, T3 and the schedules S1 and S2 given below.
T1 : r1(x); r1(z); w1(z)
T2 : r2(y); r2(z); w2(z)
T3 : r3(y); r3(x); w3(y)
S1 : r1(x); r3(y); r3(x); r2(y); r2(z); w3(y); w3(z); r1(z); w1(x); w1(z)
S2 : r1(x); r3(y); r2(y); r3(x); r1(Z); r2(z); w3(y); w1(x); w2(z); w1(z)
Which one of the following statements about the schedules is TRUE ?
1.Only S1 is conflict-serializable ✓ Correct
2.Only S2 is conflict-serializable
3.Both S1 and S2 are conflict-serializable
4.Neither S1 nor S2 is conflict-serializable
Solution
The correct answer is Only S1 is conflict-serializable
Concept:
- Using precedence graph method, we can find out Schedule is conflict serializable or not.
- If precedence graph has any loop then that schedule is going to be not conflict-serializable.
- If precedence graph doesn’t have any loop then that schedule is going to be conflict-serializable.
Explanation:
Schedule S1:
|
T1
|
T2
|
T3
|
| r(X) |
|
|
|
|
|
r(Y)
|
|
|
|
r(X)
|
|
|
r(Y)
|
|
|
|
r(Z)
|
|
|
|
|
w(Y)
|
|
|
|
w(Z)
|
|
r(Z)
|
|
|
|
w(X)
|
|
|
|
w(Z)
|
|
|
| |
|
|
Precedence graph of S1:

Since there is no loop in S1, it is is conflict serializable
Order: T2 → T1 → T2
Schedule S2:
r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z)
|
T1
|
T2
|
T3
|
| r(X) |
|
|
|
|
|
r(Y)
|
|
|
r(Y)
|
|
|
|
|
r(X)
|
|
r(Z)
|
|
|
|
|
r(Z)
|
|
|
|
|
w(Y)
|
|
w(X)
|
|
|
|
|
w(Z)
|
|
|
w(Z)
|
|
|
Precedence graph of S2:

- So there is loop in S2 so S2 is not conflict serializable.
- Schedule S1 is equivalent to only this serial schedule T2 : T3 : T1.
Hence option 1 is the correct answer.