Unix is comprised of four primary components;
iv) User process or programs.
The kernel controls the computer resources. When user login it is the kernel that runs and check to see if the user has authorization and password. It keeps track of the various programs being run, alloting time to each , monitoring when one stops and other starts .It assigns storage for user files and runs shell program.
The kernel handles the transfer of information between the computer and terminals, tape drives and printer’s. It is the heart of Unix system. It serves as an interface between shell and Unix command.
Every process interacts with the kernel in either directly by making a system call, or indirectly by being allowed to run.
The process selected by the kernel then runs until one of the following happens:
When one of the above conditions happens to a process, the kernel stops that process and allocates the CPU to another process.
HOW KERNEL ACCESSES A FILE:
1. It must first know the i-node for the current directory where it always maintains its memory. Using this number it searches the i-node blocks, and locates the i-node for this directory .It fetches from this i-node the address of the data block which contains the directory file.
2. From the directory file, the kernel looks for the file and its i-node number. It then goes back to the i-node block and locate the i-node for the file .It reads the file size, disk address entries, goes to the indirect block (if any) and reads all associated direct block entries.
3. Finally it instructs the disk driver to move the disk heads to the respective block, counts the number of bytes reads, matches it with the file size and reads till the two numbers match. There is no other way to know that the end of file has been reached.
Kernel is invisible to the user .Its written in a combination of C and assembler the kernel is almost identical on different Unix ports. Unix utilities and processes access the kernel for performance of system functions including:
Upload your original content. We will publish your material under your name on W3Professors after review.
Without your feedback, such words as Improvement, Achievement and Success have no meaning for us.
Designed and Maintained by Kanwer Technologies