A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Kernel Architecture and OS Structure

College Depth 91 in the knowledge graph ☐ I know this ☆ Set as goal
120topics build on this
350prerequisites beneath it
See this on the map →
Instruction Set Architecture (ISA)→→Boot Process and Kernel InitializationSlab Allocator for Kernel Memory+1 more
kernel monolithic microkernel os-structure

Core Idea

An operating system kernel is the core software layer that mediates between user programs and hardware, managing resources and enforcing protection boundaries. Kernels come in three primary architectural styles: monolithic (all OS services run in a single privileged address space), microkernel (only minimal services run in kernel mode; others run as user-space servers), and hybrid (a pragmatic blend used by macOS and Windows). The architectural choice determines performance characteristics, reliability, and extensibility tradeoffs. Understanding kernel structure is the foundation for understanding every other OS concept.

How It's Best Learned

Compare Linux (monolithic) and macOS/Mach (hybrid microkernel) side-by-side. Draw the privilege boundary and identify which services cross it. Then explore what a system call looks like at the assembly level.

Common Misconceptions

Explainer

If you have studied instruction set architecture, you know that CPUs provide privileged instructions that only certain code is allowed to execute — operations like disabling interrupts, accessing I/O ports, or modifying page tables. The kernel is the software that runs with these privileges. Everything else — your web browser, your text editor, the shell — runs in user mode with restricted access. The kernel is the gatekeeper: when a user program needs to do something privileged (read a file, send a network packet, allocate memory), it must ask the kernel through a system call, which switches the CPU from user mode to kernel mode, performs the operation, and switches back.

The fundamental design question in OS architecture is: how much code runs in kernel mode? A monolithic kernel puts everything — process scheduling, memory management, file systems, device drivers, networking — into a single large program running in kernel space. Linux is the canonical example. The advantage is performance: since all kernel components share the same address space, they can call each other directly with ordinary function calls, with no overhead from context switches or message passing. The disadvantage is reliability and security: a bug in any kernel component (especially device drivers, which are the largest and least-tested part of most kernels) can crash or corrupt the entire system. A single faulty video driver can bring down the whole OS.

A microkernel takes the opposite approach: only the absolute minimum runs in kernel mode — typically just inter-process communication (IPC), basic scheduling, and memory management. Everything else — file systems, device drivers, networking — runs as separate user-space server processes. When a program needs to read a file, it sends a message to the file system server via the kernel's IPC mechanism, the server performs the operation, and sends the result back. This isolation means a crashing driver only brings down its own process, not the entire system. The seL4 microkernel has even been formally verified — mathematically proven to be free of certain classes of bugs. The classic disadvantage is performance: what was a single function call in a monolithic kernel now requires multiple context switches and message copies. However, modern microkernels have narrowed this gap significantly through careful IPC optimization.

In practice, most widely-used operating systems are hybrids. Windows NT and macOS both use a design where a relatively large kernel provides core services (more than a pure microkernel) but some components run in user space (more modular than a pure monolithic kernel). macOS is built on the Mach microkernel but bundles a BSD subsystem into kernel space for performance. The choice between these architectures is not about one being objectively better — it is about which tradeoffs matter for a given system. Embedded and safety-critical systems favor microkernels for their isolation guarantees. General-purpose desktop and server systems favor monolithic or hybrid designs for their performance. Understanding this architectural spectrum is the foundation for every OS topic that follows, because whether you are studying process management, memory management, or file systems, the answer to "how does this work?" always starts with "it depends on the kernel architecture."

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Binary Counters: Design and Analysis → Binary Arithmetic → Fixed-Point Number Representation → Two's Complement Representation → Overflow and Underflow Detection → Binary Adders: Half-Adders and Full-Adders → Full Adder and Carry Propagation → Carry Lookahead Adder Design → Half Adder Circuit Design → Multiplication Circuit Design → Sequential Circuit Design → Registers and Register Files → Instruction Set Architecture (ISA) → Kernel Architecture and OS Structure

Longest path: 92 steps · 350 total prerequisite topics

Prerequisites (1)

Leads To (3)