operating-systems

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

FeatureUser ModeKernel Mode
Privilege LevelLow (Restricted)High (Unrestricted)
Hardware AccessThrough OS onlyDirect and full access
Memory AccessAllocated user space onlyAll system memory
Failure ImpactProcess crash onlyPotential system crash