The communication process opens the device driver, attaches a stream to it and then uses the Data Link Provider Interface send and receive commands for unacknowledged messages. Because we are operating with a lossy interconnect fabric and in order to minimize the packet loss due to full input buffers, our communication process needs to service incoming messages as often as possible. Thus the communication process never blocks when in need to acquire shared data structures. The functionality of the communication process is currently very simple: it only supports two-phase communication. This includes a remote read request, or commonly known as get; the recipient of such a message must then respond with a data message. It also includes a remote write request, commonly known as put; the recipient of such a message must then respond with an ack message. The process alternates between trying to receive a message and trying to send a message to the network fifos. During the receive phase, the communication process performs the following: it receives messages from the network fifo. Arriving messages are processed in a fifo order, thus in the presence of waiting messages, new arrivals may have to be buffered.
For each message processed, its type is decoded in order to determine the appropriate action.
If it is a second-phase message, either an ACK or DATA, the communication process tries to acquire the locks of the shared data so that the appropriate flag can be updated. If the lock cannot be acquired, the process buffers the incoming message and continues its execution.
If it is a first-phase message, either PUT or GET, the process tries to acquire the necessary lock in order to complete the operation. If the lock if successfully acquired and the flags indicate that the operation can proceed, then the flags are set appropriately and a response message is created. Responses are sent over the network in a strictly fifo order and thus they may have to be buffered.
During its sending phase, the communication process must alternate between messages generated in its own processor and responses. Sending a response is a fast operation, as all relevant data structures are local to the communication processor and presumably cached. Sending a new message is more expensive as it requires accessing structures shared between the compute and communication processes.