Readers

Tuesday, February 8, 2011

What is Kernel & Shell in HP-UX?

Kernel :


Kernel is a core part of the UNIX OS. Well here Core mean heart. You can give a thought that it is a software which is responsible to communicate between Hardware and user softwares. It is the Kernel that decides how to communicate with peripheral devices (like HDD, USB etc...), how to share time among users of the system, hot to allocate memory for different programs running, and how to utilize the processor and other resources. The Kernel keep record of all the programs running on the system usually we call it process and share time among this process according to the well defined policy. 


Shell :


As we have seen in above topic that what is Kernel? Now, the question comes here that how can we interact with Kernel? Can we directly tell Kernel to do few things or not? Well in that case no we can not directly interact with Kernel. Then how can we do that?


The very simple answer is SHELL. Now again what is shell?


Well shell is a user interface which is responsible to send the command to Kernel. So we can define shell in this way User can not interact with kernel directly. Instead, user will work with program called shell. We can consider shell as interpreter. 


What is the function of Shell?


1) It take command from user.
2) Interpret command.
3) Do necessary action on that command.
4) Produce the output.


The most common shell are as follows :


Bourne shell : 


Available on all UNIX platforms. It is the oldest and most widely used shell.


C shell : 


It uses a C language-like syntax for shell programming.


Korn shell : 


It has more complex and advanced features than the Bourne or C
shell and takes more time to master.


POSIX shell : 


IEEE POSIX (Portable Operating System Interface) compliant shell.
It is the default and primary shell for all users on HP-UX.


Each of these shells has its own capabilities and limitations. The default shell used on HP-UX systems is the POSIX shell, although the user is free to choose any of the available shells.  

1 comment: