diff --git a/slides/pages/recap.md b/slides/pages/recap.md index 7032a6bd28d7a83940810c2f5ac7258948e486b0..a31d5ebb217ce11d4d4102e5c5bc734ae8c6e54f 100644 --- a/slides/pages/recap.md +++ b/slides/pages/recap.md @@ -51,3 +51,58 @@ layout: two-cols <!-- <img src="/images/RPC.webp" class="block w-md"/> --> <!-- </div> --> +--- +title: Banker's Algorithm +--- + +## Banker's Algorithm I + +Calculate $v$ and $B$ and give an termination order of the threads if the situation is safe. + +<br /> + +$$ +G = \begin{pmatrix} + 5 & 3 & 3 & 1 \\ + 4 & 3 & 1 & 3 \\ + 5 & 6 & 4 & 3 \\ + 2 & 2 & 0 & 0 \\ + 6 & 5 & 3 & 2 +\end{pmatrix} + +R = \begin{pmatrix} + 4 & 3 & 2 & 1 \\ + 1 & 2 & 0 & 1 \\ + 4 & 5 & 3 & 2 \\ + 0 & 1 & 0 & 0 \\ + 5 & 3 & 1 & 1 +\end{pmatrix} + +f = \begin{pmatrix} 0 & 1 & 0 & 1 \end{pmatrix} +$$ + +--- +title: Banker's Algorithm +--- + +## Banker's Algorithm II + +Calculate $f$ and $R$ and give an termination order of the threads if the following situation is safe. + +<br /> + +$$ +G = \begin{pmatrix} + 5 & 11 & 10 \\ + 8 & 6 & 11 \\ + 7 & 3 & 5 \\ +\end{pmatrix} + +B = \begin{pmatrix} + 3 & 10 & 9 \\ + 6 & 4 & 7 \\ + 2 & 0 & 4 \\ +\end{pmatrix} + +v = \begin{pmatrix} 13 & 15 & 22 \end{pmatrix} +$$