You are on page 1of 22

kernel

• The kernel (also called nucleus) is a computer program that


constitutes the central core of a computer's operating system.
• It has complete control over everything that occurs in the
system.
• As such, it is the first program loaded on startup, and then
manages the remainder of the startup, as well
as input/output requests from software, translating them
into data processing instructions for the central processing
unit.
• It is also responsible for managing memory, and for managing
and communicating with computing peripherals, like printers,
speakers, etc. The kernel is a fundamental part of a modern
computer's operating system.
Tasks of Kernel
• The aim of the kernel is to manage the
communication between the software (user level
applications) and the hardware (CPU, disk memory
etc). The main tasks of the kernel are :
Process management
– Device management
– Memory management
– Interrupt handling
– I/O communication
– File system...etc..
Types Of Kernels
• Kernels may be classified mainly in two
categories 
– Monolithic
– Micro Kernel
Monolithic Kernel

• Monolithic kernel consists of different modules which can be


– dynamically loaded and
– un-loaded.
• This modular approach allows easy extension of OS's capabilities.
• maintainability of kernel became very easy as only the concerned module
needs to be loaded and unloaded every time there is
– change or
– bug fix in a particular module.
• So, there is no need to bring down and recompile the whole kernel for a
smallest bit of change.
• Also, stripping of kernel for various platforms (say for embedded devices etc)
became very easy as can easily unload the module that do not want.
• Linux follows the monolithic modular approach
Micro Kernel
• This architecture majorly caters to the problem of
ever growing size of kernel code which we could
not control in the monolithic approach.
• This architecture allows some basic services like
– device driver management,
– protocol stack,
– file system etc to run in user space
– This reduces the kernel code size and also increases the
security and stability of OS as we have the bare
minimum code running in kernel.
Kernel customization

• The operating system kernel is that most important part


of the system which
– drives the hardware of the machine and
– shares it between multiple processes
• If the kernel does not work well, the system as a whole
will not work well
• The main reason for making changes to the kernel is
– to fix bugs and
– to upgrade system software
• such as support for new hardware; performance gains can also be
achieved however, if one is patient.
Kernel configuration
• Kernel configuration varies widely between
operating systems.
• Some systems require kernel modification for
every miniscule change
• While others live quite happily with the same
kernel unless major changes are made to the
hardware of the host.
Cont…..
• All the basic OS services which are made part
of user space are made to run as servers which
are used by other programs in the system
through inter process communication (IPC).
– eg: we have servers for device drivers, network
protocol stacks, file systems, graphics, etc
Cont…….
• Many operating system kernels are monolithic, statically
compiled programs which are specially built for each host,
• but static programs are inflexible and the current trend is to
replace them with software configurable systems which can be
manipulated without the need to recompile the kernel.
• configurable kernels, in its quest to build an operating system
– It introduces kernel modules which can be loaded on
demand.
• By loading parts of the kernel only when required, one reduces
the size of the resident kernel memory image, which can save
memory.
Windows OS
• Windows has also taken a modular view to
kernel design.
• Configuration of the Windows kernel does not
require a recompilation, only the choice of a
number of parameters, accessed through the
system editor in the Performance Monitor,
followed by a reboot
Kernel information
Linux
 Like most UNIX implementations, Linux is composed of three
main bodies of code; the most important distinction between
the kernel and all other components.
 The kernel is responsible for maintaining the important
abstractions of the operating system
 Kernel code executes in kernel mode with full access to all
the physical resources of the computer
 All kernel code and data structures are kept in the same
single address space
Components of a Linux System
Kernel Modules
• Sections of kernel code that can be compiled, loaded,
and unloaded independent of the rest of the kernel.
• A kernel module may typically implement a device
driver, a file system, or a networking protocol
• The module interface allows third parties to write and
distribute, on their own terms, device drivers or file
systems that could not be distributed under the GPL.
• Kernel modules allow a Linux system to be set up with
a standard, minimal kernel, without any extra device
drivers built in
Kernel Virtual Memory
• The Linux kernel reserves a constant, architecture-dependent
region of the virtual address space of every process for its own
internal use
• This kernel virtual-memory area contains two regions:
– A static area that contains page table references to every
available physical page of memory in the system, so that
there is a simple translation from physical to virtual
addresses when running kernel code
– The reminder of the reserved section is not reserved for any
specific purpose; its page-table entries can be modified to
point to any other areas of memory
System Performance tuning
• Performance tuning is the improvement
of system performance.
• This is typically a computer systems.
• The motivation for such activity is called a performance
problem, which can be real or anticipated.
• Most systems will respond to increased load with some
degree of decreasing performance.
• A system's ability to accept higher load is
called scalability, and modifying a system to handle a
higher load is synonymous to performance tuning.
Systematic tuning steps
1. Assess the problem and establish numeric values that
categorize acceptable behavior.
2. Measure the performance of the system before
modification.
3. Identify the part of the system that is critical for improving
the performance. This is called the bottleneck.
4. Modify that part of the system to remove the bottleneck.
5. Measure the performance of the system after modification.
6. If the modification makes the performance better, adopt it. If
the modification makes the performance worse, put it back
the way it was.
Factors Affecting System Performance

The performance of your PC depends on a number of


factors:
– Type and speed of the CPU
– Type, speed and size of cache memory and system memory
– Type of I/O bus architecture
– Type and speed of hard disk, VGA card and network
interface card
– Operating System
– Network loading - Server performance, network traffic, etc.
Managing Heterogeneous system
• Heterogeneous is the characteristic of containing
dissimilar constituents.
• A common use of this word in information
technology is to describe a product as able to contain
or be part of a "heterogeneous network," consisting of
different manufacturers' products that can
"interoperate.“
• Heterogeneous networks are made possible by
standards-conforming hardware and software
interfaces used in common by different products
• Allowing them to communicate with each other. The
Internet itself is an example of a heterogeneous
network
Cont….
• The level of heterogeneity in modern systems
is gradually increasing as further scaling of
fabrication technologies allows for formerly
discrete components to become integrated
parts of a system-on-chip, or SoC.
– For example, many new processors now include
built-in logic for interfacing with other devices as
well as programmable functional units
and hardware accelerators 
Heterogeneous System Architecture
•  Heterogeneous System Architecture systems eliminate
the difference for the user
• Allow to use multiple processor types
typically CPUs and GPU usually on the same integrated
circuit, to provide the best of both worlds:
– general GPU processing (apart from its well-known 3D
graphics rendering capabilities, it can also perform
mathematically intensive computations on very large data sets),
– while CPUs can run the operating system and perform
traditional serial tasks.

You might also like