next up previous contents
Next: Converse Machine Model Up: Design of Converse Previous: Generalized Message Scheduling   Contents


Converse Machine Interface

The Converse Machine Interface (CMI) layer defines a minimal interface between the machine independent part of the runtime such as the scheduler and the machine dependent part, which is different for different parallel computers. Portability layers such as PVM and MPI also provide such an interface. However, they represent overkill for the requirements of Converse. For example, MPI provides a ``receive'' call based on context, tag and source processor, and guarantees in-order delivery of messages. This is unnecessary for some applications. CMI is minimal, yet it is possible to provide an efficient MPI-style retrieval on top of it.

The CMI supports both synchronous and asynchronous variants of message send and broadcast calls. For retrieving messages that have arrived on the communication network, the CMI provides the call CmiDeliverMsgs, which invokes handlers for all messages that have been received from the network. For supporting single-threaded languages, which may require that no other activity take place while the program is blocked waiting for a specific message, the CMI provides a CmiGetSpecificMsg call, which waits for a message for a particular handler while buffering any messages meant for other handlers. The CMI provides a number of utility calls including timers, atomic terminal I/O, and calls to determine the logical processor number and the total number of processors.

Converse messaging primitives are geared toward implementing other programming languages, rather than being used directly by the user program. An illustrative example of such primitives is the set of novel vector-send primitives. Message passing primitives in languages often accept user data, concatenate a header onto that data, and then send the header and data together to remote processors. For example, the MPI messaging routines accept a pointer to data, but they also specify a ``communicator'' object and an integer tag. The communicator, tag and the data are then transmitted together. The act of concatenating a header to message data often requires copying the header and data into a new buffer. This is inefficient. To help the implementers of such routines, Converse provides a set of vector-send primitives. These primitives accept an array of pointers to data. Each element in this array represents a piece of a message to be delivered. The pieces of data are concatenated and sent, but the concatenation is often done very efficiently, without the overhead of copying. For example, on machines where messages are packetized, the packets are simply gathered by scanning the array and packetizing each piece separately. On machines with shared memory, messaging is sometimes implemented by copying a message from the sender's memory to the receiver's memory. In this case, vector send is implemented by concatenating straight into the receiver's memory. All of these optimizations are done transparently to the Converse user by the implementation of the vector-send primitives, thus reducing programming complexity.



Subsections
next up previous contents
Next: Converse Machine Model Up: Design of Converse Previous: Generalized Message Scheduling   Contents
Milind Bhandarkar 2002-06-12