1,044 views
0 votes
0 votes
if transactions are T1:r(A),w(A),r(B),w(B),c

                               T2: r(A),r(B),c

then howmany recoverable schedule possible over T1,T2?

1 Answer

Best answer
0 votes
0 votes

Number of concurrent schedule=$\binom{8}{3}=56$

Number of irrecoverable schedule=check here are 2 dirty read . So, anyone of them causing dirty read

$\text{Case 1:}$ when $R_{2}(A)$ placing at top,  $W_{1}(B)$ and $R_{2}(B)$ causing dirty read. So, only 1 schedule possible

$T_{1}$ $T_{2}$
  $R(A)$
$R(A)$  
$W(A)$  
$R(B)$  
$\color{red}{W(B)}$  
  $\color{red}{R(B)}$
  $Commit$
$Commit$  
   

 

$\text{Case 2:}$ In case of $R_{2}(A)$ placing after $R_{1}(A)$

Here also 1 Irrecoverable schedule possible

$T_{1}$ $T_{2}$
$R(A)$  
  $R(A)$
$W(A)$  
$R(B)$  
$\color{red}{W(B)}$  
  $\color{red}{R(B)}$
  $Commit$
$Commit$  
   

 

$\text{Case 3:}$ When $R_{2}(A)$ is placing after $W_{1}(A)$

Here we already getting dirty read for $A$, So, no need to concentrate more for dirty read

$T_{1}$ $T_{2}$
$R(A)$  
$\color{red}{W(A)}$  
  $\color{red}{R(A)}$
$R(B)$  
$W(B)$  
  $R(B)$
  $Commit$
$Commit$  
   

 

Here number of irrecoverable schedule $3+2+1=6$

$\text{Case 4:}$ Here $R_{2}(A)$ is paced after $R_{1}(B)$

$T_{1}$ $T_{2}$
$R(A)$  
$\color{red}{W(A)}$  
$R(B)$  
  $\color{red}{R(A)}$
$W(B)$  
  $R(B)$
  $Commit$
$Commit$  
   

 

Here 3 irrecoverable schedules,

$\text{Case 5:}$ Schedule as given i question

$T_{1}$ $T_{2}$
$R(A)$  
$\color{red}{W(A)}$  
$R(B)$  
$\color{red}{W(B)}$  
  $\color{red}{R(A)}$
  $\color{red}{R(B)}$
  $Commit$
$Commit$  
   

 

Here only 1 schedule is possible

 

So, total numberof recoverable schedule=$56-12=44$

refer:https://gateoverflow.in/31867/how-many-recoverable-schedules-are-possible-from-t1-and-t2

selected by

Related questions

0 votes
0 votes
0 answers
1
Rohit Kumar 2 asked Sep 9, 2018
359 views
someone please give the video solution of this question or give a detailed solution. how to approach this kind of question. you are welcome.
1 votes
1 votes
2 answers
3
DebRC asked Aug 16, 2022
2,058 views
Is only conflict serializable schedules are recoverable?Or both view as well as conflict serializable schedules are recoverable?I have been seeing different answers in di...
0 votes
0 votes
1 answer
4
sripo asked Nov 25, 2018
710 views
S=r1(A),w2(A),r3(A),w1(A),w3(A)Is this Schedule Non Recoverable? As there is a dirty read happening at w2(A)->r3(A)