On u-Kernel Construction Jochen Liedtke - 1995 ------------------------ Summary: The inefficiency of current u-kernels is due to poor implementation, and is not an inherent property of the u-kernel design principle. Background: Traditionally, the kernel is the part of the OS that is mandatory and common to all other software. The basic idea of the u-kernel approach is to minimize this part. The advantages of this approach are: 1. Modularity: A clear u-kernel interface enforces a more modular system stucture. 2. Fault isolation: server malfunctions are as isolated as any other user program's malfunctions. 3. Flexibility: different servers with different strategies can coexist in the system. Problem: Current u-kernels suffer from poor performance. The cause that is cited is the increased user-kernel mode and address-space switches inherent in a u-kernel approach. Minimal primitives in a u-kernel: these are chosen based, not on efficiency, but on whether moving the concept outside of the kernel would prevent the implementation of the system's required functionality. - Address spaces: hide the hardware concept of address spaces, since otherewise, implemeting protection is impossible. I/O device support is built on top of address spaces. - Threads and IPC: the association of threads to address spaces requires that threads be in the kernel; since threads are in the kernl, cross-address-space communication must also be supported by the kernel. - Unique IDs: required for reliable and efficient local communication. Assumptions: - The target system has to deal with protection between processes. - Hardware implements page-based virtual memory. Performance: - Kernel-user switches: theoretical minimum is sufficiently low and a good implementation can come close to it. - Address space switches: most of the problem is in TLB flushes, which can be minimized by using or emulating tagged TLBs. - Thread swithces and IPC: can be implemented pretty quickly and is processor architecture dependent. - Memory effects: properly constructed u-kernels can be avoid the memory degradation of Mach. Lesson on portability: making a u-kernel portable prevents them from achieving the necessary performance and flexibility. - Cannot take advantage of specific hardware. - Cannot take precautions to avoid performance problems with specific hardware. - The additional layer costs performance.