Why UNIX?
UNIX is important in the study of operating systems because most operating systems
that have been developed in the past 25 years owe a great deal of their design to UNIX.
Windows started as DOS which looks like a tiny version of UNIX. NT is related to VMS which
looks like UNIX. And Linux is UNIX.
Many of the design elements of UNIX are present in newer operating systems.
UNIX is still widely used because it provides the services needed to manage a
computer is a simple, efficient way.
UNIX History
UNIX was developed by Ken Thompson and Dennis Ritchie in the early 70's at Bell Labs.
Before UNIX, there was Multics. Both OS's were designed from the start to be multi-tasking
and multi-user.
Earlier OS's were batch oriented and had interactive aspects grafted on. Univac 1100 OS thought
each line typed as a card, even when it came from a terminal. It thought terminals were just
really slow card readers.
C was invented later to write applications for UNIX. UNIX was re-written in C. This was an important
step forward. OS's were always written in assembler and were specific to the machine. UNIX was the
portable OS. It was first ported from the PDP11 class machines in 1977. C and UNIX are inseparable.
You can't really understand UNIX without knowing C. And parts of C make more sense when you
know how UNIX works.
UNIX was given to universities and variants began.
The major variant was BSD UNIX, Berkeley Software Distribution. The AT&T version
settled on Version 5.
There are several principals to UNIX that contribute to it's success.
- Written in a high level language.
This is very important. It made it possible to port UNIX. A small part
of the process handling code was in assembler. Porting that small amount
is do-able. It aslo made it possible for more people to understand
the system. Since assembler code is unique to a machine, OS's written in
them were only readable to a few. This is like the fact that people
all speak different languages and can't understand each other.
But trade languages develop that allow common understanding.
C is that trade language. Most programmers can at least read C and
so UNIX can be understood by more people. This ease of understanding
outweighs the fact the C version of UNIX is larger and slower
than the assembler version.
- Simple user interface
While some would question the idea that UNIX is simple, it is compared
to what came before. The commands to simply create a file in earlier OS's
could be several lines long.
- Modules
This is another concept that can't be over-emphasized. UNIX was designed as a collection
of small components that could be combined together.
This allows the developer to build larger systems out of
smaller, easier to understand pieces. It also allows the OS to be improved in pieces.
Building the OS as layers, allows the user to get a consistent view of the system
even if things in lower layers are changed.
Mac Os and especially Windows are built as a giant single system
which is confusing to work on.
- Hierarchical file system
A tree structured file system is easy to understand, allows the user to organize their
files in a simple way and is efficient to implement.
- Consistent file format
All files are a collection of bytes. This makes it easy to understand
and simple to manipulate.
- Peripherals
In UNIX all devices look like files. So a program can be written that will work
the same way regardless of where it gets its I/O from.
- Multiuser, multitasking
These aren't the same thing. Windows 98 and prior are really single user,
single tasking OS's. Windows NT on a desktop is essentially a single user, multi-tasking OS.
Earlier batch systems were multi-user but single-tasking.
UNIX allows multiple users to be running multiple processes at the same time.
- Hides the hardware
This is related to the peripherals part above. The details of the hardware
are hidden from the user behind a simple interface.