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