Consider the transactions $T_1, T_2, T_3$ and the schedules $S_1$ and $S_2$ given below.
$T_1 : r_1(x); r_1(z); w_1(z)$
$T_2 : r_2(y); r_2(z); w_2(z)$
$T_3 : r_3(y); r_3(x); w_3(y)$
$S_1$ :
$r_1(x); r_3(y); r_3(x); r_2(y); r_2(z); w_3(y); w_3(z); r_1(z); w_1(x); w_1(z)$
$S_2$ :
$r_1(x); r_3(y); r_2(y); r_3(x); r_1(z); r_2(z); w_3(y); w_1(x); w_2(z); w_1(z)$
Which one of the following statements about the schedules is TRUE ?
To check conflict serializability we build precedence graph.
Conflicts:
$T_1 \rightarrow T_3$
$T_3 \rightarrow T_2$
$T_2 \rightarrow T_1$
Cycle exists:
$T_1 \rightarrow T_3 \rightarrow T_2 \rightarrow T_1$
Therefore
$S_1$ not conflict-serializable
Conflicts:
$T_3 \rightarrow T_1$
$T_2 \rightarrow T_1$
$T_3 \rightarrow T_2$
Graph has no cycle
Serializable order:
$T_3 \rightarrow T_2 \rightarrow T_1$
Thus
$S_2$ is conflict-serializable
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.