[lug] Newbie Column - The Unix Design

Wayde Allen wallen at boulder.nist.gov
Wed Jan 26 10:36:08 MST 2000


Ok, so now you that you have an idea about how the UNIX system got
started, let's take a quick look at the underlying design. Like any
operating system, the primary idea is to create an interface between the
physical system hardware, and higher level program operations. In other
words you don't want a program or user to have to worry about how data is
read from a keyboard or written to a disk or monitor. That is the job of
the operating system. What was different about UNIX was that rather than
trying to create the entire interface as one large assembly language
program, the job was broken up into small pieces. The following ASCII
diagram might help.


           -------------------------------------------------------
           |               User Environment                      |
           |    ---------------------------------------------    |
           |    |               Shell                       |    |
           |    |   -------------------------------------   |    |    
           |    |   |           Kernel                  |   |    |
           |    |   |   ----------------------------    |   |    |
           |    |   |   |     Physical Hardware    |    |   |    |
           |    |   |   ----------------------------    |   |    |
           |    |   |                                   |   |    |
           |    |   -------------------------------------   |    |
           |    |                                           |    |
           |    ---------------------------------------------    |
           |                                                     |
           -------------------------------------------------------


As you can see, the user (you or your programs) only need to be written to
communicate with the the shell layer. (Basically, the shell is the program
that deciphers the commands that you type on the command line.) The shell
program in turn passes requests to for hardware operations to the kernel
which is the only layer that needs to actually talk directly to the
hardware. This means that in order to make UNIX run on different hardware,
only the system kernel needs to re-written and compiled to run on a
different physical machine. The shell and user programs to the extent that
they follow this model don't need to be changed.

Also, since UNIX evolved in an open environment with the system source
code readily available, a very rich collection of programs has been
developed. For instance, there are many possible shell programs in use.
The C-shell, T-shell, Z-shell, Bourne Shell, Bash, etc.. Which one you use
is up to you. This array of choices is often confusing if you are used to
the single interface available to you when using commercial operating
systems such as DOS or Windows.  What is important here is realizing that
in the UNIX system you can essentially customize everything, and if what
you want doesn't exist, it is possible to create it.

- Wayde
  (wallen at boulder.nist.gov)






More information about the LUG mailing list