next up previous contents
Next: Rendezvous protocol Up: Sketch of a ``Device-Level'' Previous: Implementation notes   Contents

Eager send protocol

Messages are sent immediately by isend, assuming unlimited space for data in the input buffer. In practise this protocol is most suitable for short messages.

Figure 3: Pseudocode for isend method (eager protocol)
send the messagereturn a non-pending (completed) request object\end{verbatim}\normalsize\end{figure}

Figure 4: Pseudocode for irecv method (eager protocol)
lock communication-sets
if irec...
...munication-setsreturn the request object\end{verbatim}\normalsize\end{figure}

Figure 5: Pseudocode for waitany method (eager protocol)
lock communication-sets
if all...
select one of the non-pending requests\end{verbatim}\normalsize\end{figure}

Figure 6: Pseudocode for input handler threads (eager protocol)
\begin{figure}\small\begin{verbatim}loop {
receive headerlock communicati...
... input-buffer
unlock communication-sets

Bryan Carpenter 2002-07-12