You now know the doorway between user and kernel — the
The answer to "how much goes in the kernel?" is the deepest architectural fork in operating systems. Push everything in and you get a monolithic kernel: fast, because subsystems call each other as ordinary functions, but a single trust domain where any bug is fatal. Push almost everything out into isolated user-space servers and you get a microkernel: robust and verifiable, but paying a tax every time those servers must talk. This lesson maps the whole spectrum, and the trade-off that runs through it: performance versus isolation.
Every OS draws a line: on one side, code that runs privileged and shares one address space; on the other, code that is isolated and must trap or message to get anything done. Moving a subsystem across that line changes two things in opposite directions:
That is the entire debate in one sentence: isolation is bought with IPC, and IPC is not free. The whole zoo of kernel architectures — monolithic, micro, hybrid, exo, uni — is different answers to where to stand on that line, given a workload and a threat model.
Here are the same jobs — scheduling, memory, file systems, drivers — placed two different ways. On the left, all of them sit below the privilege line in one kernel. On the right, only three primitives stay privileged; the file system, network stack, and drivers become ordinary user-space servers, reached by messages.
The left diagram has one big trusted box and few crossings; the right has many small isolated boxes and many crossings. Neither is "correct" — they optimise different things. A phone baseband or a pacemaker wants the right-hand picture (a bug must not be catastrophic); a database server maxing out NVMe bandwidth wants the left.
Real systems spread across five recognisable points. Read the table as a line from "everything in the kernel" to "almost nothing in the kernel", then two exotic points that rethink the abstraction entirely.
| Architecture | Real systems | In the kernel | Isolation | Cost driver |
|---|---|---|---|---|
| Monolithic | Linux, FreeBSD, classic Unix | everything: sched, VM, FS, net, drivers | low — one trust domain | cheap: in-kernel function calls |
| Microkernel | seL4, Mach, MINIX 3, QNX | IPC, threads, address spaces only | high — each server isolated | the IPC / microkernel tax |
| Hybrid | Windows NT, XNU (macOS) | a Mach-ish core + subsystems kept in-kernel for speed | medium | pragmatic compromise |
| Exokernel / library OS | MIT Exokernel, Nemesis, Barrelfish | only secure multiplexing of raw hardware | app-defined | OS abstractions linked into the app (libOS) |
| Unikernel | MirageOS, IncludeOS, Unikraft | no user/kernel split — one app + libOS in one address space | via the VM/hypervisor boundary | tiny, single-purpose image |
Notice the exokernel and unikernel don't sit on the monolithic⇄micro line at all — they change the question. An exokernel says "don't give me abstractions, give me safe access to the raw disk and I'll build my own file system as a library." A unikernel says "there is only one application, so why have a protection boundary inside the image at all?" — and relies on the hypervisor for isolation instead.
Make the trade-off concrete. Consider one operation — reading a file — which must touch the file system and a block-device driver. In a monolithic kernel that is one user↔kernel crossing; the FS calls the driver as a function. In a microkernel, the application messages the FS server, which messages the driver server, and each message is a full round trip. The simulation tallies the crossings for both designs.
In January 1992, on the Usenet group
Two myths to kill. First, monolithic describes only that the components share one address space and privilege level — not that they are a tangled mess. Linux is intensely modular internally (loadable modules, the VFS layer, clean subsystem interfaces); it is monolithic because those modules run in the kernel, not because they are spaghetti. Second, calling Windows NT or macOS's XNU a hybrid can sound like "the best of both worlds", but it really means "a microkernel-derived design that pulled performance-critical services (file systems, drivers, graphics) back into the kernel address space to avoid the IPC tax." A hybrid buys speed by giving up the microkernel's isolation for those subsystems — a compromise, not a free lunch.