You are on page 1of 5

Kernel is central component of an operating system that manages operations of computer and

hardware. It basically manages operations of memory and CPU time. It is core component of an
operating system. Kernel acts as a bridge between applications and data processing performed
at hardware level using inter-process communication and system calls.

Kernel loads first into memory when an operating system is loaded and remains into memory
until operating system is shut down again. It is responsible for various tasks such as disk
management, task management, and memory management.

Kernel has a process table that keeps track of all active processes

• Process table contains a per process region table whose entry points to entries in region table.
Kernel loads an executable file into memory during ‘exec’ system call’.
Objectives of Kernel :

• To establish communication between user


level application and hardware.
• To decide state of incoming processes.
• To control disk management.
• To control memory management.
• To control task management.
User Mode: When a Program is booted up on an
Operating system let’s say windows, then it launches the
program in user mode. And when a user-mode program
requests to run, a process and virtual address space
(address space for that process) is created for it by
windows. User-mode programs are less privileged than
user-mode applications and are not allowed to access the
system resources directly. For instance, if an application
under user-mode wants to access system resources, it
will have to first go through the Operating system kernel
by using syscalls.
Kernel Mode: The kernel is the core program on which all the
other operating system components rely, it is used to access the
hardware components and schedule which processes should run
on a computer system and when, and it also manages the
application software and hardware interaction
Hence it is the most privileged program, unlike other programs it
can directly interact with the hardware. When programs running
under user mode need hardware access
for example webcam, then first it has to go through the kernel by
using a syscall, and to carry out these requests the CPU switches
from user mode to kernel mode at the time of execution. After
finally completing the execution of the process the CPU again
switches back to the user mode.
Criteria Kernel Mode User Mode

In kernel mode, the program has direct and In user mode, the application program executes
unrestricted access to system resources. and starts. Difference Between
Kernel-mode vs User mode Kernel mode and User mode:
In Kernel mode, the whole operating system might In user mode, a single process fails if an interrupt
go down if an interrupt occurs occurs.  
Interruptions

Kernel mode is also known as the master mode, User mode is also known as the unprivileged mode,
privileged mode, or system mode. restricted mode, or slave mode.
Modes

In kernel mode, all processes share a single virtual In user mode, all processes get separate virtual
address space. address space.
Virtual address space

In kernel mode, the applications have more While in user mode the applications have fewer
privileges as compared to user mode. privileges.
Level of privilege

As kernel mode can access both the user programs


as well as the kernel programs there are no While user mode needs to access kernel programs
restrictions. as it cannot directly access them.
Restrictions

The mode bit of kernel-mode is 0. While; the mode bit of user-mode is 1.


Mode bit value

It can only make references to memory allocated


It is capable of referencing both memory areas. for user mode. 
Memory References

A system crash in kernel mode is severe and makes


things more complicated. In user mode, a system crash can be recovered by
  simply resuming the session.
System Crash

Only essential functionality is permitted to operate User programs can access and execute in this mode
in this mode. for a given system.
Access
The user mode is a standard and typical viewing
The kernel mode can refer to any memory block in mode, which implies that information cannot be
the system and can also direct the CPU for the executed on its own or reference any memory
execution of an instruction, making it a very potent block; it needs an Application Protocol Interface
and significant mode. (API) to achieve these things.
Functionality

You might also like