- Ten bugs per thousand lines of code. This means that a monolithic OS of five million lines of code is likely to contain something like 50000 kernel bugs. The basic idea behind the microkernel design is to achieve high reliability by splitting the OS up into small, well-defined modules.
- Modularizing the kernel using the microkernel approach: This method structures the OS by removing all nonessential components from the kernel and implementing them as system and user-level programs.
- If the hardware provides multiple privilege levels, then the microkernel is the only software executing at the most privileged level.
- The result is a smaller kernel. There is little consensus regarding which services should remain in the kernel and which should be implemented in user space. Typically, however, microkernels provide minimal process and memory management, in addition to a communication facility.
- The main function of the microkernel is to provide a communication facility between the client program and the various services that are also running in user space.
- Communication is provided by message passing. For example, if the client program wishes to access a file, it must interact with the file server. The client program and service never interact directly. Rather, they communicate indirectly by exchanging messages with the microkernel.
- One benefit of the microkernel approach is ease of extending the OS.
- Unfortunately, microkernels can suffer from performance decreases due to increased system function overhead. Consider the history of Windows NT.
- The first release had a layered microkernel organization. However, this version delivered low performance compared with that of Windows 95.
- Windows NT 4.0 partially redressed the performance problem by moving layers from user space to kernel space and integrating them more closely. By the time Windows XP was designed, its architecture was more monolithic than microkernel.
- The MINIX 3 microkernel is only about 3200 lines of C and 800 lines of assembler for very low-level functions such as catching interrupts and switching processes.
- The C code manages and schedules processes, handles interprocess communication (by passing message between processes), and offers a set of about 35 kernel calls. The process structure of MINIX 3 is shown in Fig. 14
Figure 14:
Structure of the MINIX 3 system.
|
Cem Ozdogan
2010-02-19