Figure 2.2 shows the events that take place. We are
interested in reducing the total time the user application is
delayed:
. Also of interest is the response time
(
); the time from message arrival until the handler
begins to run.

Figure 2.2: Execution Flow on a Node with Restricted Access to
the Network Interface: An arriving message interrupts the
currently running user application. The kernel, in supervisor
mode, receives the message and deposits it into a buffer. A
context switch to the appropriate handler occurs. To send
messages, the handler has to trap into the kernel. A final
trap into the kernel is necessary to resume the interrupted
user application.
Table 2.1 summarizes the time intervals that characterize the
events on a given node. A message arrives at a node and causes an
interrupt. The CPU switches into supervisor mode, saves the current
context, and sets up the context for the kernel to run. This time
interval is symbolized by
. The kernel then proceeds
to read the message from the network interface into a buffer in main
memory. We represent this time interval with
. The
value for
varies with the length of the message.
Furthermore, for longer messages it is possible to engage the DMA
unit and continue processing while the message is being received.
For our analysis we ignore this optimization and assume the CPU
remains busy during the receipt of the message.

Table 2.1: Time Intervals of Interest
After determining which handler to invoke, it takes
time to switch context and start running the handler. In the example
of Figure 2.2 the handler does some processing and then sends
two messages. For each message the handler has to trap into the
kernel,
. The kernel will send the message (with the
same assumption about staying busy as for message reception). This
takes
time, which increases with larger messages. The
time to return from the kernel trap back to the handler is
.
When the handler finishes, it traps into the kernel one more time to
re-establish the original context. The time it takes to return from
an interrupt to the user level process is
.