in Databases edited by
8,765 views
38 votes
38 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$
in Databases edited by
8.8k views

4 Comments

In this type of question what should be the answer ? when no option match
0
0
i think as in this non serial schedule , we are not able to make it equivalent to a serial schedule . so either we do T1 completely then T2 . OR T2 completely then T1.

basically either of the 2 serial schedules should be performed.

i feel option c is correct and for d) the intent of the statement is not clear.
0
0
This question is not mentioned clearly in 2019 GO hardcopy.
1
1
Yes diagram is not mentioned properly.
0
0

6 Answers

54 votes
54 votes
Best answer

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 is no blind writes. So, the given schedule is not even view serializable. 

Option D is the Answer. 

 
edited by

4 Comments

Prince Sindhiya

Yes right.. I don't know how I got it as serializable at that time :P

0
0

If we use lock here , then B) will be ans

eg:

https://gateoverflow.in/235026/test-series?show=236902

0
0
edited by
what should be the ans of this qsn??
0
0
6 votes
6 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!!

1 comment

cycle therefore not CS. and even there is no blind writes therefore not VS
5
5
Answer:

Related questions