\batchmode


\documentclass{article}
\makeatletter

\usepackage{psfig}


\makeatother
\newenvironment{tex2html_wrap}{}{}
\newwrite\lthtmlwrite
\def\lthtmltypeout#1{{\let\protect\string\immediate\write\lthtmlwrite{#1}}}%
\newbox\sizebox
\begin{document}
\pagestyle{empty}
\stepcounter{section}
\stepcounter{section}
\stepcounter{section}
{\newpage
\clearpage
\samepage \begin{figure*}[tp]
\centerline{\psfig{figure=tower.eps,height=4in}}

\end{figure*}
}

\stepcounter{section}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure*}[tp]
\centerline{\psfig{figure=MPJ-Jini.eps,height=2.5in}}

\end{figure*}
}

\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{section}
\stepcounter{subsection}
\stepcounter{subsection}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}  isend:
    send the message

    return a non-pending (completed) request object\end{verbatim}
\normalsize

\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}  irecv: 
    lock communication-sets
      if irecv matches some message in the input buffer {
        copy data into user-buffer
        acquire a non-pending (completed) request object
      }
      else
        put a request object in the pending-request-set
    unlock communication-sets

    return the request object\end{verbatim}
\normalsize

\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}  waitany:
    lock communication-sets
      if all of the specified set of requests are pending
        associate one wait-object with all specified requests
    unlock communication-sets

    if all the requests were pending
      `synch()' on wait-object
    else
      select one of the non-pending requests\end{verbatim}
\normalsize

\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}    loop {
      receive header

      lock communication-sets
        if message matches some request in pending-request-set {
          receive data into user-buffer

          remove the request from the pending-request-set

          if the request has an associated wait-object {
            dissociate that wait-object from all requests

            `synch()' on wait-object
          }
        }
        else
          receive data into input-buffer
      unlock communication-sets
    }\end{verbatim}
\normalsize

\end{figure}
}

\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}  isend:
    lock communication-sets
      put a send request object in the pending-request-set
    unlock communication-sets

    send a ready-to-send message

    return the request object\end{verbatim}
\normalsize

\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}  irecv: 
    lock communication-sets
      if irecv matches a ready-to-send message in the input buffer
        acquire a non-pending request object
      else
        put a receive request object in the pending-request-set
    unlock communication-sets

    return the request object\end{verbatim}
\normalsize

\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}  waitany:
    lock communication-sets
      if all of the specified set of requests are pending
        associate one wait-object with all specified requests
    unlock communication-sets

    if all the requests were pending
      `synch()' on wait-object
    else
      select one of the non-pending requests

    if selected request was a receive request {
      associate a wait-object with the request

      send a ready-to-receive message (containing id of request)

      `synch()' on wait-object (waiting for data)
    }

    if selected request was a send request
      send the data\end{verbatim}
\normalsize

\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[p]
\small
\begin{verbatim}  input handler threads:
    loop {
      receive header

      lock communication-sets

        if message is a ready-to-send message {
          if header matches some receive request in pending-request-set {
            remove the matching request from the pending-request-set

            if the request has an associated wait-object {
              dissociate the associated wait-object from all requests

              `synch()' on wait-object
            }
          }
          else
            put the ready-to-send message in the input buffer
        }
            
        if message is a ready-to-receive message {
          remove the matching request from the pending-request-set

          if the request has an associated wait-object {
            dissociate that wait-object from all requests

            `synch()' on wait-object
          }
        }

        if message is data {
          receive the data

          `synch()' on wait-object in request (identified in header)
        }

      unlock communication-sets
    }\end{verbatim}
\normalsize

\end{figure}
}

\stepcounter{section}

\end{document}
