next up previous
Next: Protocol Up: No Title Previous: Startup Phase

Reliability Without Context Switch

It is important to observe that the MPI semantics allow for reliable message transfer without relying on a background process or interrupt mechanism. This avoids the performance penalties associated with context switches.

The schematic of an example MPI program is shown in Figure 2. The difficulty with achieving reliability is that the flow of control might not be inside the MPI library routines when a check for reliable delivery is due. For instance, a send call might return immediately, the application goes off to do computation (shown as green boxes in Figure 2), but the packet gets lost and needs to be retransmitted. We observe that always the flow of control returns to the MPI layer when it is critical, for instance when there is any kind of blocking operation (e.g. wait, or blocking send or receive). While blocking inside the MPI layer, we make sure that communication progresses to prevent deadlock. If the application does not call any blocking routines, we can still rely on the fact that a correct MPI program must call MPI_Finalize() before it exits. At that point, we deal with packet loss, retransmit unacknowledged packets, and acknowledge received packets. If the probability of packet loss is very small, or the application is synchronizing frequently anyway, deferring the reliability enforcement to MPI_Finalize() will hardly degrade performance.

 
Figure 2:   Schematic of an MPI example program (unimportant arguments have been ommitted for simplicity).



Bernd Pfrommer
Mon May 26 12:18:25 PDT 1997