Definition
User Mode
User Mode is a restricted processor execution state for untrusted application code. CPU cannot execute privileged instructions or access memory outside user space.
Restrictions
User Mode Limitations
Code cannot:
- Access kernel space memory
- Manipulate hardware registers directly
- Execute privileged instructions (attempt generates trap)
Transitions
Mode Switching
To perform privileged operations, process transitions to Kernel Mode via:
- System Calls: Explicit program requests
- Interrupts: Asynchronous hardware signals
- Traps: Synchronous exceptions (e.g., division by zero)
Comparison
| Feature | User Mode | Kernel Mode |
|---|---|---|
| Privilege Level | Low (Restricted) | High (Unrestricted) |
| Hardware Access | Through OS only | Direct and full access |
| Memory Access | Allocated user space only | All system memory |
| Failure Impact | Process crash only | Potential system crash |