14-10-2010, 10:16 AM
[attachment=5957]
Unix Kernel Architecture
Unix Kernel Architecture
The kernel runs the show, i.e. it manages all the operations in a Unix flavored
environment. The kernel architecture must support the primary Unix requirements. These
requirements fall in two categories namely, functions for process management and
functions for file management (files include device files). Process management entails
allocation of resources including CPU, memory, and offers services that processes may
need. The file management in itself involves handling all the files required by processes,
communication with device drives and regulating transmission of data to and from
peripherals. The kernel operation gives the user processes a feel of synchronous
operation, hiding all underlying asynchronism in peripheral and hardware operations (like
the time slicing by clock). In summary, we can say that the kernel handles the following
operations :
1. It is responsible for scheduling running of user and other processes.
2. It is responsible for allocating memory.
3. It is responsible for managing the swapping between memory and disk.
4. It is responsible for moving data to and from the peripherals.
5. it receives service requests from the processes and honors them.
All these services are provided by the kernel through a call to a system utility. As a result,
kernel by itself is rather a small program that just maintains enough data structures to
pass arguments, receive the results from a call and then pass them on to the calling
process. Most of the data structure is tables. The chore of management involves keeping
the tables updated. Implementing such a software architecture in actual lines of code
would be very small. The order of code for kernel is only 10000 lines of C and 1000 lines
of assembly code.
Kernel also aids in carrying out system generation which ensures that Unix is aware of all
the peripherals and resources in its environment. For instance, when a new disk is
attached, right from its formatting to mounting it within the file system is a part of system
generation.