From 9553a1e1fe7193ad6427a669da802db6927a041e Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Fri, 25 Sep 2015 20:26:42 +0200
Subject: Finish assignment 4

---
 assignment4/assignment4.tex | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

(limited to 'assignment4/assignment4.tex')

diff --git a/assignment4/assignment4.tex b/assignment4/assignment4.tex
index e31b35e..1d20051 100644
--- a/assignment4/assignment4.tex
+++ b/assignment4/assignment4.tex
@@ -4,9 +4,6 @@
 
 \usepackage{minted}
 
-\usepackage{enumitem}
-\setenumerate[1]{label=\alph*.}
-
 % textcomp package is not available everywhere, and we only need the Copyright symbol
 % taken from http://tex.stackexchange.com/a/1677/23992
 \DeclareTextCommandDefault{\textregistered}{\textcircled{\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont R}}
@@ -20,9 +17,9 @@
 
 \usepackage{amsmath}
 \usepackage{amsfonts}
+\usepackage{mathtools}
 
 \usepackage{enumitem}
-\setenumerate[1]{label=\alph*.}
 
 \parindent0pt
 
@@ -35,10 +32,22 @@
 \thispagestyle{fancy}
 
 \section*{6.11}
-%todo
+\begin{enumerate}
+    \item No process is marked, because no process has all zeros in the allocation matrix.
+    \item $W \coloneqq (2,1,1,2)$.
+    \item Take $i=1$.
+    \item Mark $P_1$, $W \coloneqq (2,1,2,2)$.
+    \setcounter{enumi}{2}
+    \item Take $i=3$.
+    \item Mark $P_3$, $W \coloneqq (2,2,3,2)$.
+    \setcounter{enumi}{2}
+    \item Both $Q_2 > W$ and $Q_4 > W$, so we terminate.
+\end{enumerate}
+
+There are unmarked processes ($P_2,P_4$), therefore, deadlock exists, for exactly those processes.
 
 \section*{6.18}
-\begin{enumerate}
+\begin{enumerate}[label=\alph*.]
     \item If there are two types of philosophers, the fourth condition of deadlock (circular wait) is not fulfilled. Lefties and righties can never be in a chain waiting for resources. Therefore, deadlock cannot occur.
     \item On a table with two philosophers, of which one is a lefty and one a righty, it is obvious to see that one philosopher will start eating and when he is done, the other one can grab the forks. No starvation occurs.
 
-- 
cgit v1.2.3

