Kernal:
Bridge between applications and data
Tharindu Weerasinghe
Kernel is the central component of most computer operating systems;
it is a bridge between applications and the actual data processing done
at hardware level. The kernel’s major duty is to manage the system’s
resources communicating between hardware and software components.
Main task of a kernel is to allow the execution of applications |
A kernel provides the lowest-level abstraction layer for the
resources, especially processors and Input-Output devices that
application software must control to perform its function. It typically
makes these facilities available to application processes through
inter-process communication mechanisms.
Basic facilities
The kernel’s primary purpose is to manage the computer’s resources
and allow other programs to run and use these resources. Typically, the
resources consist of:
* Central Processing Unit (CPU).
As we have discussed in earlier articles, CPU is the central part of
a computer system, responsible for running or executing programs on it.
The kernel takes responsibility for deciding at any time which of the
many running programs should be allocated to the processor or processors
each of which can usually run only one program at a time.
* Computer’s memory.
A computer’s memory is used to store both program instructions and
data.
Typically, both need to be present in memory in order for a program
to execute.
Often multiple programs will want access to memory, frequently
demanding more memory than the computer has available.
The kernel is responsible for deciding which memory each process can
use, and determining what to do when not enough is available.
* Input-Output (I-O)
Devices present in the computer, such as keyboard, mouse, disk
drives, printers and displays.
The kernel allocates requests from applications to perform I-O to an
appropriate device or subsection of a device, in the case of files on a
disk or windows on a display and provides convenient methods for using
the device typically abstracted to the point where the application does
not need to know implementation details of the device.
Key aspects necessary in resource managements are the definition of
an execution domain (address space) and the protection mechanism used to
mediate the accesses to the resources within a domain.
Kernels usually provide methods for synchronization and communication
between processes, called inter-process communication or IPC.
A kernel may implement these features itself, or rely on some of the
processes it runs to provide the facilities to other processes, although
in this case it must provide some means of IPC to allow processes to
access the facilities provided by each other.
Finally, a kernel must provide running programs with a method to make
requests to access these facilities.
Process management of a Kernal
The main task of a kernel is to allow the execution of applications
and support them with features such as hardware abstractions. A process
defines which memory portions the application can access.
To run an application, a kernel,
1. Sets up an address space for the application,
2. Loads the file containing the application’s code into memory,
perhaps via demand paging
3. Sets up a stack for the program and branches to a given location
inside the program, thus starting its execution.
To be continued
|