DSA Factory
Free What the OS does lessonsWhat the OS does · Stage 0 · The operating system's job · Step 2

Kernel mode and user mode

Why the CPU has two privilege levels, and what stops a program from taking over the machine. About 12 minutes.

Quick check

Why can't a user program simply switch the CPU into kernel mode itself?

  1. AChanging the mode is itself a privileged operation, enforced by the hardware
  2. BThe OS checks every instruction in software before it runs
  3. CIt would need the administrator's password
Show the answer

Changing the mode is itself a privileged operation, enforced by the hardware. User-mode code is physically not allowed to run it.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve