An operating system can have various modes of operation and these modes define standardised instructions for deciding what resources can be accessed, limit memory access and more in order to protect data and provide system security.
There are two types of modes, User Mode and Kernel Mode. A kernel mode is also known as supervisor mode.
It has restricted access to the resources. CPU has restrictions, therefore, it can have only access to limited instructions and memory. Utility applications such as text editor, media player are run in this mode.
When an application or program is executed, its initial state and operation mode are loaded on stack. At this point, CPU starts executing the program in this particular mode. Interrupts and traps are used to signal or flag the CPU to switch back to Kernel mode and do the essential tasks by storing the current state of the user program to the stack again. After completing it, CPU resumes the program from where it left.
It has full access to memory, I/O and other resources. In this, CPU can execute any instructions and have full access to underlying hardware. The core functionalities of the operating system always run in Kernel mode.
Having these authorities, processes using this mode have full rights to access resources, allowing them read/write to the storage media, enable and disable hardware and more. Difference between Kernel Mode and User Mode :
Basis | Kernel Mode | User Mode |
---|---|---|
Permission | Unrestricted and full permissions to access the system's hardware | Restricted and limited permissions to access the system's hardware |
Memory reference | It can reference to both the memory spaces | It can only reference to memory space that is dedicated to user mode |
Access | Only core functionality can be allowed to operate in this very mode | User applications can access this mode for a particular system and is allowed to operate in this particular mode |
System crash | Fatal and increases the complexity | Recoverable and can simply restart the session |
Also Known | Privileged mode or Supervisor mode | Restricted mode |
This post was last modified on May 30, 2021