Home » Operating Systems

Dual Mode of Operating Systems

In this article, we are going to study about the Dual Mode of the Operating System. We will first define these modes and then will discuss the ways in which the Operating System functions in each of these modes.
Submitted by Monika Sharma, on June 30, 2019

Modes of Operating System

There are two modes in which an Operating System works. These are:

  1. The User Mode
  2. The Kernel Mode

Let us study each of them in detail...

1) User Mode of Operating System

When the computer system runs user applications like file creation or using any other application program, then the system is in the User Mode. This mode does not have direct access to the hardware of the Computer. For performing hardware related tasks, like when the user application requests for a service from the Operating System or some interrupt occurs, in these cases the System must switch to the Kernel Mode. The mode bit of the user mode is 1. This means that if the mode bit of the processor of the system is 1, then the system will be in the User Mode.

2) Kernel Mode of Operating System

All the bottom level tasks of the Operating system are performed in the Kernel Mode. As the Kernel space has direct access to the hardware of the system, so the kernel mode handles all the processes which require hardware support. Apart from this, the main functionality of the Kernel Mode is to execute privileged instructions. These privileged instructions are not provided the user access, and that's why these instructions cannot be processed in the User mode. So, all the processes and instructions that the user is restricted to interfere with are executed in the Kernel Mode of the Operating System. The mode bit for the Kernel Mode is 0. So, for the system to function in the Kernel Mode, the Mode bit of the processor must be equal to 0.

Need for Dual Mode of Operating System

There are certain types of processes which are to be made hidden from the user, and certain tasks which do not require any type of hardware support. Using the Dual Mode of the OS, these tasks can be dealt with separately.

Also, it is important for the Operating System to function in the dual mode because the Kernel Level programs perform all the bottom level functions of the OS like process management, Memory management, etc., and if these are altered by the user, then this can cause an entire system failure. So, for specifying the access to the users only to the tasks which are of their use, Dual Mode is necessary for an Operating system.

So, whenever the system works on the user applications, it is in the User mode. Whenever the user requests for some hardware services, a transition from User mode to Kernel mode takes place and this is done by changing the mode bit from 1 to 0. And for returning again into the User mode, the mode bit is again changed to 1.






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.