next up previous
Next: Drinking Philosophers Problem Up: Figures in the book Previous: Mutual Exclusion: Using Timestamps

Mutual Exclusion: Tokens and Quorums

Figure: A centralized algorithm for client processes
\fbox{\begin{minipage}{\textwidth}\sf
\begin{tabbing}
x\=xxxx\=xxxx\=xxxx\=xxxx\...
...u)$: // program message\\
\> \> $v := max(v,u.v)$;
\end{tabbing}\end{minipage}}

Figure: A centralized algorithm for the coordinator process
\fbox{\begin{minipage}{\textwidth}\sf
\begin{tabbing}
x\=xxxx\=xxxx\=xxxx\=xxxx\...
... \> \> $havetoken := f\!alse$;\\
\> \> {\bf endif}
\end{tabbing}\end{minipage}}

Figure: A decentralized token-based algorithm for mutual exclusion
\fbox{\begin{minipage}{\textwidth}\sf
\begin{tabbing}
x\=xxxx\=xxxx\=xxxx\=xxxx\...
... \> \> $havetoken := f\!alse$;\\
\> \> {\bf endif}
\end{tabbing}\end{minipage}}



Vijay K. Garg 2005-02-08