next up previous contents
Next: Puma Portal Event Handlers Up: Remote Handlers Previous: Active Messages

Intel NX

NX is the message passing system used on the Intel Paragon and its predecessors [73, ]. The hrecv() function behaves much like an ordinary receive with the exception that, upon message arrival, a user specified handler is invoked. The mechanism is interrupt driven and a full context switch to the handler occurs on message reception.

To measure performance, we used a simple benchmark that posts an hrecv() and then waits for a global variable to change. The handler that is invoked by hrecv() increments this variable and returns. (This is a measurement of tex2html_wrap_inline1849.) Averaged over 10000 trials, we measured an invocation time of about tex2html_wrap_inline1841s. The same measurement for an irecv(), a non-blocking receive without a handler, yields tex2html_wrap_inline1843s. Figure 3.1 shows the pseudo code of our benchmark.

  figure430
Figure 3.1: hrecv() Benchmark: Measure the time from message arrival until start of the handler (tex2html_wrap_inline1849).

In both cases the receive is pre-posted and the receiving node spins in a tight loop at user level, waiting for the incoming message. The incoming message causes an interrupt and the operating system kernel reads the zero length message from the network.

To process an hrecv(), the kernel switches context to the handler, executes it, and does another context switch to the original user program. The handler sets the global variable gotit to TRUE. Inside the loop, the test program checks the global variable to determine when the handler has run. While the test program spins inside the loop, it produces a series of time stamps. Once outside the loop, it is easy to determine the time stamp from just before the interrupt took place. The gap to the next time stamp is larger (tex2html_wrap_inline2113) than the gaps measured in successive, uninterrupted loop iterations. The constant tex2html_wrap_inline2115 is larger than the overhead of a clock() function call, but less than the interrupt time: (clock()tex2html_wrap_inline2117 - clock()tex2html_wrap_inline2119) tex2html_wrap_inline2121

In the case of an irecv(), the kernel simply returns to the user level. Inside the loop, the test program uses msgdone() to know when the message has arrived. Again, a larger gap between time stamps reveals the one just before and the one just after the interrupt has been taken. The high cost of hrecv() makes it impractical to use in the contexts proposed for this research.


next up previous contents
Next: Puma Portal Event Handlers Up: Remote Handlers Previous: Active Messages

Rolf Riesen
Wed Jan 22 22:24:20 MST 1997