next up previous contents
Next: General Purpose CPU as a Message Up: Mapped Network Interface Previous: Handler at User Level

Handler in Kernel

 

Figure 2.5 shows the situation where the handler is executed in the kernel. Again, the arriving message triggers an interrupt and forces control flow into the kernel. The kernel receives the message into a buffer and then simply calls the appropriate handler. The handler does its processing and sends its two messages. A return from interrupt leads back into user mode where the interrupted application resumes.

  figure155
Figure 2.5: Mapped Network Interface, Handler in Kernel: An arriving message interrupts the currently running process. The kernel receives the message into a buffer in main memory and calls the handler without a context switch. The handler executes and sends its two messages. A return from interrupt resumes execution of the original user application.

Since the network interface is accessible from user mode, no savings are possible by executing the handler in the kernel. However, a context switch to the handler and a trap to restore the original context can be avoided. The saved time is:
displaymath1888


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