OS 1 Process Management
OS 1 Process Management
PROCESS MANAGEMENT
1
Introduction to Operating System
An Operating System is software responsible for performing all the basic tasks in a computer
system like managing files, processes, and memory. An operating system behaves as a manager
for all the resources, hence also known as a resource manager. In simple words, an operating
system is defined as an interface between user and hardware.
2. MODES OF OPERATION IN OS
Operating system operates in two modes; one is known as User mode and the other is Kernel
mode.
2.1. User Mode
The system is considered to be in user mode when the operating system launches a
custom application, such as a word processor control. A switch to kernel mode from
user mode occurs when application requests help from the operating system, or a
system call or interrupt occurs.
In the user mode the mode bit is set to 1. Mode bit is changed from 1 to 0 when
changed from user mode to kernel mode.
2.2. Kernel Mode
When the system starts up or boots in the system, it is in kernel mode and then the OS
is loaded, it executes all applications in the user mode. There are some privileged
instructions on computers that can only be executed in kernel mode. These privileged
instructions are interrupts, handle input and output, and so on. If privileged instructions
are executed in user mode, it will be illegal, and a trap is generated.
In the kernel mode the mode bit is set to 0. Mode bit is changed from 0 to 1 when
switching from kernel mode to user mode.
Necessity of Dual Mode (User Mode and Kernel Mode) in Operating System
The lack of a dual mode in an operating system can cause some serious problems. Some
of these issues are −
A running user program can accidentally wipe out from the system by overwriting the
running program with user data.
Multiple processes can be overwritten in the same system at the same time, which will
give disastrous results.
Such issues could have occurred in the MS-DOS OS which had no mode bit so no dual
mode.