您的位置:首页 > 运维架构 > Linux

读书笔记 - Linux Kernel Development

2013-09-04 22:25 405 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: