The function of Unix is manned in three levels. On
the outer crust reside the application programs and the other utilities, which
speak our language. At the heart of Unix on the other hand is the kernel which
interacts with actual hardware in machine language. The streamlining of these
two modes of communication is done by the middle layer called shell.
The shell or the command line interpreter as it is
called is the mediator, which interprets the commands that we give and they
conveys them to the kernel which ultimately executes them. You can imagine
kernel as monarch who is in overall control of everything, whereas the shell as
its emissary.
The kernel has various functions. It manages files,
carries out all the data transfer between the file system and the hardware, and
also manages memory. The onus of scheduling of various programs running in
memory or allocation of CPU time to all running programs lies with the kernel.
It also handles any interrupts issued, as it is the entity that has direct
dealing with the hardware.
The kernel program is usually stored in the file
called Unix whereas the shell program is in a file called sh . For each user
working with Unix at any time different shell programs are running. Thus at a
particular point in time there may be several shells running in memory but only
one kernel This is because at any instance Unix is capable of executing one
program as the other program wait for their turn. And since it is the kernel which executes the
program one kernel is sufficient . However different terminal are trying to
seek kernel’s attention. And since the user interacts with the kernel through
the shell different shells are necessary.
Types Of Shells:
Different people implemented the interpreter
function of the shell in different ways.This gave rise to various type of
shells , the most prominent of which are outlined below,
Bourne Shell
Steve Bourne |
Among all Steve Bourne’s creation know after him the
Bourne shell is the most popular. Probably that’s why it is bundled with every
Unix system. Or perhaps it is the other way around Because it was bundled with
every system it became popular. Whatever the cause and the effect, the fact remains
that this is the shell used by many Unix users. This will also be the shell we
shall use by many Unix users.
C Shell
Bill Joy |
This shell is a hit with those who are seriously
into Unix programming. It was created by Bill Joy then pursuing his graduation
at the University of California at Berkeley.
It has two advantage over the Bourne shell,
1) It allows aliasing of commands. That is you can
decide what name you want to call a command by. This proves very useful when lengthy
commands which are used time and again are renamed by you. Instead of typing
the entire command you can simply use the short alias at the command line.
2) If you want to save even more typing work , C
shell has a command history feature . This is the second benefit that comes
with C shell. Previously typed commands can be recalled, since the C shell
keeps track of all commands issued at the command line. This feature is similar
to the one provided by the program DOSKEY in MS-DOS environment.
Korn Shell
If there was any doubt about the cause-effect
relationship of the population of Bourne Shell and its inclusion in every
package, this adds fuel to it. The not so widely used Korn Shell is very
powerful and is a superset of Bourne Shell. It offers a lot more capabilities and
is decidedly Korn of AT & T’s Bell Labs.
Overview:Unix System Organization
Reviewed by ITAdmin
on
May 11, 2015
Rating:
Good Start....!
ReplyDelete