Skip to content
BENIBIX Learn

User Mode and Kernel Mode

Development🖥️ Platforms & OSOperating Systems

Also known as User Mode, Kernel Mode, User Space, Kernel Space, Protection Ring, Privilege Level

Two levels of trust. Apps get the low one, and the kernel gets the high one.

Think of it like

It is like a shop with a counter. You stay on your side, and only the staff go in the back.

Example

Emma's photo app crashes, and only its window closes. A week later a broken graphics driver crashes, and the whole screen goes blue and restarts.

Why it matters

It explains why one bad app rarely takes the computer down, and why one bad driver can. So a driver update needs more care than an app update.

Definition

User mode and kernel mode are two levels of trust that the chip itself enforces. Apps run in user mode, where they can only touch their own memory. The kernel and most drivers run in kernel mode, where they can touch anything. An app crosses the line only by making a system call. So a crash in user mode ends one app, and a crash in kernel mode can stop the whole computer.
The apps on top run in user mode. The kernel and the drivers inside the shaded box run in kernel mode.

Common mistake

Thinking an app that runs as an admin is in kernel mode. Admin is a user with more rights, and its apps still run in user mode.

Key takeaways

  1. 1
    The chip enforces it. The line is drawn in the hardware, not just in software.
  2. 2
    One door across. An app reaches the kernel's side only by a system call.
  3. 3
    Crashes stay small. A fault in user mode ends one app and nothing else.

Learn it properly