edited by
12,849 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

19.2k
views
5 answers
34 votes
Ishrat Jahan asked Nov 2, 2014
19,218 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 concurrency
30.1k
views
8 answers
53 votes
Ishrat Jahan asked Nov 1, 2014
30,058 views
Consider a system with $2$ level cache. Access times of Level $1$ cache, Level $2$ cache and main memory are $1$ $ns$, $10$ $ns$, and $500$ $ns$ respectively ... $12.8$12.6$12.4$
7.9k
views
2 answers
35 votes
Ishrat Jahan asked Nov 2, 2014
7,906 views
Consider a table $T$ in a relational database with a key field $K$. A $B$-tree of order $p$ is used as an access structure on $K$, where $p$ denotes the maximum ... $ is$20$22$23$32$
11.4k
views
3 answers
38 votes
Ishrat Jahan asked Nov 2, 2014
11,365 views
Consider two tables in a relational database with columns and rows as follows: ... fail but ii will succeedi will succeed but ii will failBoth i and ii will succeed