|
| 1 | +\documentclass[../../main.tex]{subfiles} |
| 2 | + |
| 3 | +\begin{document} |
| 4 | + |
| 5 | +\subsection{18.2 Conflict-Serializability} |
| 6 | + |
| 7 | +\subsubsection*{Exercise 2.1} |
| 8 | + |
| 9 | +a) |
| 10 | + |
| 11 | +I don't give an example here, because the $t$ and $s$ is different, |
| 12 | +thus $(T_{1}, T_{2})$ would be equivalent to $(T_{2}, T_{1})$. |
| 13 | + |
| 14 | +b) |
| 15 | + |
| 16 | +Need community help. |
| 17 | + |
| 18 | +c) |
| 19 | + |
| 20 | +According to the definition of serial schedules. The only serial order |
| 21 | +that we have is $(T_{1}, T_{2})$ and $(T_{2}, T_{1})$. Thus we can |
| 22 | + |
| 23 | +d) |
| 24 | + |
| 25 | +To identify the number of serializable schedule of the 12 given actions, |
| 26 | +we need to consider the interleaving of the serial order $(T_{1}, T_{2})$ |
| 27 | +and $(T_{2}, T_{1})$. And we have the following order: |
| 28 | + |
| 29 | +\begin{itemize} |
| 30 | + \item $T_{1}$ operates on $A$ and $B$ before $T_{2}$. |
| 31 | + \item $T_{2}$ operates on $A$ and $B$ before $T_{1}$. |
| 32 | + \item $T_{1}$ operates on $A$ first, but $T_{2}$ operates on $B$ first. |
| 33 | +\end{itemize} |
| 34 | + |
| 35 | + |
| 36 | +$$ |
| 37 | +\left(\frac{6!}{3! \times (6 - 3)!}\right)^{2} = 400 |
| 38 | +$$ |
| 39 | + |
| 40 | +\subsubsection*{Exercise 2.2} |
| 41 | + |
| 42 | +a) |
| 43 | + |
| 44 | +We cannot swap the adjacent actions without a conflict, only |
| 45 | +$(T_{1}, T_{2})$ is conflict equivalent to itself. So the answer is 1. |
| 46 | + |
| 47 | +b) |
| 48 | + |
| 49 | +We can swap the adjacent actions without a conflict, so the answer is |
| 50 | + |
| 51 | +c) |
| 52 | + |
| 53 | +$$ |
| 54 | +\left(\frac{4!}{2! \times (4 - 2)!}\right)^{2} = 36 |
| 55 | +$$ |
| 56 | + |
| 57 | +d) |
| 58 | + |
| 59 | +The number of actions differs. This implies that we have different |
| 60 | +answers as number of actions determines the number of possible |
| 61 | +interleavings for the serializable order. |
| 62 | + |
| 63 | +\subsubsection*{Exercise 2.3} |
| 64 | + |
| 65 | +a) |
| 66 | + |
| 67 | +$$ |
| 68 | +\frac{4!}{2! \times (4 - 2)!} \times 2 = 12 |
| 69 | +$$ |
| 70 | + |
| 71 | +b) |
| 72 | + |
| 73 | +$$ |
| 74 | +\left(\frac{4!}{2! \times (4 - 2)!}\right)^{2} = 36 |
| 75 | +$$ |
| 76 | + |
| 77 | +\subsubsection*{Exercise 2.4} |
| 78 | + |
| 79 | +Need community help. |
| 80 | + |
| 81 | +\subsubsection*{Exercise 2.5} |
| 82 | + |
| 83 | +Need community help. |
| 84 | + |
| 85 | +\subsubsection*{Exercise 2.6} |
| 86 | + |
| 87 | +Need community help. |
| 88 | + |
| 89 | +\end{document} |
0 commit comments