Dual Mode of Operations | Operating System - Computer Science Engineering (CSE) PDF Download

Introduction

An error in one program can adversely affect many processes, it might modify data of another program, or also can affect the operating system. For example, if a process stuck in the infinite loop then this infinite loop could affect the correct operation of other processes.
So to ensure the proper execution of the operating system, there are two modes of operation: 
1. User mode
When the computer system is run by user applications like creating a text document or using any application program, then the system is in user mode. When the user application requests for a service from the operating system or an interrupt occurs or system call, then there will be a transition from user to kernel mode to fulfill the requests. 

Note: To switch from kernel mode to user mode, the mode bit should be 1.

Given below image describes what happen when an interrupt occurs: 

Dual Mode of Operations | Operating System - Computer Science Engineering (CSE)

2. Kernel Mode
When the system boots, hardware starts in kernel mode and when the operating system is loaded, it starts user application in user mode. To provide protection to the hardware, we have privileged instructions which execute only in kernel mode. If the user attempts to run privileged instruction in user mode then it will treat instruction as illegal and traps to OS. Some of the privileged instructions are: 

  • Handling Interrupts
  • To switch from user mode to kernel mode.
  • Input-Output management.

Note: To switch from user mode to kernel mode bit should be 0.

Privileged and Non-Privileged Instructions in Operating System

In any Operating System, it is necessary to have a Dual Mode Operation to ensure the protection and security of the System from unauthorized or errant users. This Dual Mode separates the User Mode from the System Mode or Kernel Mode.
Dual Mode of Operations | Operating System - Computer Science Engineering (CSE)

What are Privileged Instructions? 
The Instructions that can run only in Kernel Mode are called Privileged Instructions.
Privileged Instructions possess the following characteristics: 

  1. If any attempt is made to execute a Privileged Instruction in User Mode, then it will not be executed and treated as an illegal instruction. The Hardware traps it in the Operating System. 
  2. Before transferring the control to any User Program, it is the responsibility of the Operating System to ensure that the Timer is set to interrupt. Thus, if the timer interrupts then the Operating System regains the control.
    Thus, any instruction which can modify the contents of the Timer is Privileged Instruction.
  3. Privileged Instructions are used by the Operating System in order to achieve correct operation. 
  4. Various examples of Privileged Instructions include:
    (i) I/O instructions and Halt instructions
    (ii) Turn off all Interrupts
    (iii) Set the Timer
    (iv) Context Switching
    (v) Clear the Memory or Remove a process from the Memory
    (vi) Modify entries in the Device-status table

What are Non-Privileged Instructions? 
The Instructions that can run only in User Mode are called Non-Privileged Instructions.
Various examples of Non-Privileged Instructions include: 

  • Reading the status of Processor
  • Reading the System Time
  • Generate any Trap Instruction
  • Sending the final printout of Printer

Also, it is important to note that in order to change the mode from Privileged to Non-Privileged, we require a Non-privileged Instruction that does not generate any interrupt.

The document Dual Mode of Operations | Operating System - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Operating System.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
10 videos|99 docs|33 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Dual Mode of Operations - Operating System - Computer Science Engineering (CSE)

1. What is dual mode of operations?
Ans. Dual mode of operations refers to the ability of a system or device to switch between two different modes of operation. In the context of this article, it refers to the capability of a device or network to operate in both wired and wireless modes.
2. What are the advantages of dual mode operations?
Ans. The advantages of dual mode operations include increased flexibility, as it allows users to switch between wired and wireless connections based on their needs. It also provides redundancy, ensuring that the system remains operational even if one mode fails. Additionally, dual mode operations can improve scalability and enable seamless integration with existing infrastructure.
3. How does dual mode operation work?
Ans. Dual mode operation works by allowing a device or network to support both wired and wireless connections. This can be achieved through the use of dual mode devices that have built-in capabilities for both modes, or by utilizing separate devices that can be switched between wired and wireless modes.
4. What types of devices support dual mode operations?
Ans. Various devices can support dual mode operations, including laptops, smartphones, tablets, routers, and access points. These devices are designed to have the ability to connect to networks using both wired and wireless technologies.
5. Are there any limitations or drawbacks to dual mode operations?
Ans. While dual mode operations offer many benefits, there are some limitations and drawbacks to consider. One limitation is that dual mode devices may be more expensive compared to devices that only support a single mode. Additionally, the performance of the device or network may vary depending on the mode being used, with wired connections generally offering faster and more reliable speeds compared to wireless connections.
10 videos|99 docs|33 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

past year papers

,

Free

,

Dual Mode of Operations | Operating System - Computer Science Engineering (CSE)

,

MCQs

,

video lectures

,

study material

,

pdf

,

shortcuts and tricks

,

Viva Questions

,

Sample Paper

,

Previous Year Questions with Solutions

,

Summary

,

Exam

,

practice quizzes

,

mock tests for examination

,

Objective type Questions

,

Extra Questions

,

Dual Mode of Operations | Operating System - Computer Science Engineering (CSE)

,

Important questions

,

ppt

,

Dual Mode of Operations | Operating System - Computer Science Engineering (CSE)

,

Semester Notes

;