edited by
12,130 views
43 votes
43 votes

Consider the following schedule $S$ of transactions $T1$ and $T2:$

$${\begin{array}{l|l}
\textbf{T1}&    \textbf{T2} \\\hline
\text{Read(A)} \\
\text{A = A – 10}\\
&   \text{Read(A) }\\  
&  \text{Temp = 0.2*A} \\
& \text{Write(A)} \\
& \text{Read(B)} \\    
\text{Write(A)}\\
 \text{Read(B)}\\
\text{B = B + 10}\\
\text{Write(B)} \\
& \text{B = B + Temp}  \\  
& \text{Write(B)}\\ 
\end{array}}$$

Which of the following is TRUE about the schedule $S$ ?

  1. $S$ is serializable only as $T1, T2$
  2. $S$ is serializable only as $T2, T1$
  3. $S$ is serializable both as $T1, T2$ and $T2, T1$
  4. $S$ is not serializable either as $T1,T2$ or as $T2,T1$
edited by

6 Answers

Best answer
65 votes
65 votes

There is a cycle in the precedence graph - so the given schedule is not Conflict Serializable. 

If a schedule is view serializable but not conflict serializable it MUST have one or more blind writes. Here, there are no blind writes. So, the given schedule is not even view serializable. 

Option D is the Answer. 

 
edited by
7 votes
7 votes

For a schedule to be serializable check as follows : 

a) check for CSS(sufficient but not necessary) : since cycle in precedence graph. so not CSS.

b) check for VSS (sufficient and necessar): since no blind write it is not VSS.

thus not serializable(equivalent to any serial schedule).

Only serial schedule is possible either as T1->T2 or T2->T1.

3 votes
3 votes
Ans is Option D which is saying that each transaction should run individually that is T1 separate and T2 separate
0 votes
0 votes
no option correct as there is cycle in precedence graph therfore it is not VSS means not serializable!!
Answer:

Related questions

34 votes
34 votes
5 answers
1
Ishrat Jahan asked Nov 2, 2014
18,563 views
Which level of locking provides the highest degree of concurrency in a relational database ?PageTableRowPage, table and row level locking allow the same degree of concurr...
38 votes
38 votes
3 answers
4
Ishrat Jahan asked Nov 2, 2014
10,846 views
Consider two tables in a relational database with columns and rows as follows:$$\overset{\text{Table: Student}}{\begin{array}{|c|c|c|} \hline \textbf {Roll_no} & \textbf{...