A processor is more than just an "executor." It has access levels and operating modes.
If any program could:
- manage memory
- disable devices
- change processor settings
the system would be insecure and unstable.
-
Privileged Mode
-
full access to everything
-
used by the kernel
-
Restricted Mode
-
a limited set of instructions
-
used by user programs
It determines:
- what instructions are allowed
- what memory areas can be accessed
- whether devices can be controlled directly
The kernel:
- runs in the most privileged mode
- controls transitions between modes
- protects the system from application errors