Deadline: 2013.09.30
Chapter One: Introduction to Linux Kernel
Monolithic Kernel vs. Microkernel
Monolithic Kernels: implemented entirely as a signle process running in a single address space. The kernel can invoke functions directly, as a user-space application. Most Unix systems are monolithic in design.
Microkernel: functionality of the kernel is broken down into separate processes, usually called servers. Ideally, only servers requring such capability run in privileged execution mode. The rest of servers run in user-space. Direct function invocation is not possible. Instead, microkernels communicate with messages passing. Various servers communicate with and invoke "services" from each other by sending messages over IPC (Inter-Process Communication) mechanism. The separation prevents a failure in one server from bringing down another.
IPC involves a quite a bit more overhead than a trivial function call, however, and because a context switch from kernel-space to user-space or vice versa is often involved, message passing includes a latency and throughput hit not seen on monolithic kernels with simple function invocation. Consequently, most of microkernel based systems now place most or all the servers in kernel space, to remove the overhead of context switch. Windows/Mac are microkernel examples.
Linux is a monolithic kernel system. Linux boasts a modular design, the capability to preempt itself (Kernel Preemption), support for kernel threads, and capatility to dynamically load separate binaries (Kernel Modules) into kernel image. Linux has none of the performance sapping features that curse microkernel design: everything runs in kernel mode, with direct function invocation - not message passing. Linux is modular, threaded, and the kernel itself is schedulable.
2013.09.04
本文探讨了宏内核与微内核的设计理念及其优缺点。宏内核将所有核心功能集成到单一进程中,而微内核则将这些功能拆分为独立的服务进程。文章详细介绍了两种内核类型的工作原理,并通过实例比较了它们在性能和稳定性方面的差异。
1190

被折叠的 条评论
为什么被折叠?



