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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticFixed-Point Number RepresentationTwo's Complement RepresentationOverflow and Underflow DetectionBinary Adders: Half-Adders and Full-AddersFull Adder and Carry PropagationCarry Lookahead Adder DesignHalf Adder Circuit DesignMultiplication Circuit DesignSequential Circuit DesignRegisters and Register FilesInstruction Set Architecture (ISA)Kernel Architecture and OS Structure

Longest path: 92 steps · 350 total prerequisite topics

Prerequisites (1)

Leads To (3)