Kernel structures
Monolithic, microkernel, modular, hybrid: how trusted code is packaged and how isolation trades off against performance.
Monolith, microkernel, modular, hybrid
Start here
What do we mean by “kernel structure”? (theory)
Kernel structure describes how subsystems (scheduler, VM, VFS, drivers, IPC) are packaged into address spaces and trust boundaries. A monolithic kernel runs most of them in one privileged image for fast in-kernel calls. A microkernel keeps a tiny privileged core and pushes file systems, network stacks, and drivers toward user-space servers, paying IPC costs for stronger isolation. Real systems are often hybrids: monolith + loadable modules, or kernel fast paths + user-space helpers (FUSE, graphics stacks).
The trusted computing base (TCB) is the set of components you must believe are correct for security claims to hold, structure directly affects TCB size.
By the end of this page you should be able to
- Contrast monolithic vs microkernel on isolation, IPC overhead, and local call cost.
- Explain what a loadable kernel module is (and is not) on Linux.
- Describe FUSE and what functionality moves to user space vs what stays in the kernel.
- Argue one scenario where you would accept weaker isolation for performance.
Three common labels (icons are mnemonics only)
Monolith + modules
Microkernel
Hybrid
Why this topic exists in OS courses
You cannot evaluate container security, driver quality, or hypervisor design without knowing what shares the kernel’s single address space. Performance tuning also depends on structure: inlined VFS paths and shared page-cache metadata are monolith advantages.
TL;DR
Kernel structure describes how drivers, filesystems, and IPC are packaged: monolithic kernels trade isolation for performance; microkernels push services user-side; real systems are hybrids with loadable modules and user-space helpers.
Structure is about engineering tradeoffs: fault isolation, performance, verification effort, and upgrade velocity. When you design embedded or cloud systems, you pick not only algorithms but which parts must stay in the TCB (trusted computing base).
Four structural patterns (theory cards)
Monolith
Single binary: scheduler, MM, FS, drivers share address space, fast calls, weaker fault isolation.
Microkernel
Minimal core runs IPC, scheduling, low-level mapping; servers implement FS/network in user mode.
Modular monolith
Runtime load/unload of `.ko` into kernel VA; symbol exports/versioning manage ABI drift.
Hybrid (practical)
User-space FUSE/graphics stacks with performance-critical paths still in kernel.
Comparison tables
Structural comparison (stylized)
| Style | Isolation | IPC overhead | Example |
|---|---|---|---|
| Monolith + modules | Weaker in-kernel | Low (function calls) | Linux |
| Microkernel | Strong | Higher | seL4, Mach heritage |
| Hybrid | Mixed | Mixed | Windows, macOS XNU aspects |
Design axis
| Axis | Monolith | Microkernel |
|---|---|---|
| Local call cost | Function pointer | Message + schedule |
| Driver fault | Kernel panic risk | Restart user server |
| Evolution speed | Modules / eBPF | User servers independent |
Tradeoffs in prose
Address space boundaries = trust boundaries
IPC cost dominates microkernel debates
Modules complicate symbol versioning
User-space file systems exist
Pitfalls
- “Microkernel is always slower”: IPC batching and hardware fastpaths narrowed the gap; throughput vs isolation remains workload-specific.
- Ignoring module trust: Unsigned/out-of-tree modules disable some hardening features on secure-boot systems.
Terms
Inter-process communication, messages, shared memory, capabilities in microkernel designs.
Loadable kernel module, extends a running monolithic kernel.
Single-address-space image with application + minimal OS linked, no userspace/kernel split as usual.
Interview
- Why can a monolithic kernel still support FUSE?
- What failure mode moves you toward exokernels or unikernels?
- How does eBPF relate to extensibility without recompiling the monolith?
Interview angle
Explain why Linux stayed monolithic historically and how namespaces/cgroups approximate some microkernel benefits.
Why monoliths won performance
Debate prompt
lsmod | head
Self-check
1A Linux kernel module runs in…
2Microkernels emphasize…
3FUSE moves what to user space?