next up previous
Next: Conclusion Up: Performance improvements Previous: Using the DSNIC board

Low-latency context switches

Context switches are the main cause of both latency and CPU load. We can distinguish three types of context switches: (1) rescheduling, requiring context switches between processes or between threads, (2) kernel calls, requiring context switching between process and kernel space, and (3) interrupts requiring context switching between process and kernel space.

In a general purpose OS, these context switches require a lot of CPU time, and thereby cause both latency and load. Using light weight alternatives for the OS context switches can therefore result in a significant performance improvement. However, a light weight alternative usually implies a restriction in some other field, e.g., no protection between processes, a limitation in the use of OS functionality, or support for only a single process. If the restriction is acceptable, this method offers an interesting solution. Solutions that apply this method can be found in [4], [14], and [20]. Graph C in Figure 12 shows the potential of such an improvement, assuming the 0-byte latency is 20  s, instead of , and assuming the interrupt handling overhead can be completely removed, which reduces the interrupt handling time from 32.5  s to 11.5  s. Furthermore, graph D in Figure 12 shows the effect of applying both the improvement methods: off-loading and low-latency context switches.



Marcel Boosten
Wed Mar 11 14:25:07 MET 1998