Process modes

Processes normally has at least 2 modes.

  • Kernel mode: Which has privileged access to hardware resources.
  • User mode: Must access resources through the OS via system calls.

The mode is determined by a bit set in the CPU. If an application running in user mode tries to access hardware this sends a trap instruction to the OS for the operating system to inspect that call. This will freeze the application whilst this is being investigated.