Dual Mode & Multimode Operation

Samir Shah
2 min readApr 22, 2019

--

Since the operating system and users share the hardware and software resources of the computer system, a properly designed operating system must ensure that an incorrect (or malicious) program cannot cause other programs to execute incorrectly.

In order to ensure the proper execution of the operating system, we must be able to distinguish between the execution of operating-system code and user- defined code.

The approach taken by most computer systems is to provide hardware support that allows us to differentiate among various modes of execution.

Modes of operation:

  • User Mode
  • Kernel Mode

Kernel mode is also called supervisor mode, system mode or privileged mode.

A bit, called the mode bit, is added to the hardware of the computer to indicate the current mode.

Mode bit in Kernel

With the mode bit, we can distinguish between a task that is executed on behalf of the operating system and one that is executed on behalf of the user.

When the computer system is executing on behalf of a user application, the system is in user mode.

Whenever a user application requests a service from the operating system (via a system call), the system must transition from user to kernel mode to fulfil the request.

Whenever the operating system gains control of the computer, it is in kernel mode.

The concept of modes can be extended beyond two modes in which case the CPU uses more than one bit to set and test the mode.

CPUs that support virtualisation frequently have a separate mode to indicate when the virtual machine manager (VMM) — and the virtualisation management software — is in control of the system.

In this mode, the VMM has more privileges than user processes but fewer than the kernel.

--

--