next up previous
Next: Leader Election Up: Figures in the book Previous: Mutual Exclusion: Tokens and

Drinking Philosophers Problem

Figure: (a) Conflict graph (b) An acyclic orientation with $P_2$ and $P_4$ as sources (c) Orientation after $P_2$ and $P_4$ finish eating
\begin{figure}\centerline{\epsfbox{figs/conflict.eps}}\end{figure}

Figure: An algorithm for dining philosophers problem
\fbox{\begin{minipage}{\textwidth}\sf
\begin{tabbing}
x\=xxxx\=xxxx\=xxxx\=xxxx\...
... fork $f$}:\\
\> \> $f\!ork(f)$ := $true$;\\
\\
\end{tabbing}\end{minipage}}

Figure: An algorithm for drinking philosophers problem
\fbox{\begin{minipage}{\textwidth}\sf
\begin{tabbing}
x\=xxxx\=xxxx\=xxxx\=xxxx\...
...g a bottle $b$}:\\
\> \> $bot(b) := true$;\\
\\
\end{tabbing}\end{minipage}}



Vijay K. Garg 2005-02-08