From UNIX v6 to Linux
Required reading: The UNIX Time Sharing System
What about UNIX was revolutionary?
File system structure
- Multi-level hierarchical namespace
- Directory traversal via slash-separated pathnames
- Same namespace used for files, devices
- Flat files:
byte-oriented streams,
no kernel-defined blocks or records
- Inodes, file linking
Contrast:
previous file systems (e.g., VMS)
had one or at most two levels of structure,
often required apps to deal with files in terms of multi-byte records.
Shell and application environment
- Shell as a normal user-mode program
- Can be instantiated many times,
controlled like other applications
- Different shell implementations/languages possible
- Shell as a programming language
- Files, environment variables hold the "program state"
- Pipes, redirection provide the plumbing
- Applications, filters provide the building blocks
or "library functions"
- Led to a different paradigm for writing applications:
each small and simple,
but can be combined using the shell
to provide powerful functionality.
Contrast:
Previously shells or command interpreters were merely
a mechanism for starting applications.
Applications were big, complex, monolithic,
and expected to do everything themselves.
Kernel development approach
- Initially written by 2 guys over a few years
- Written in a high-level language (C)
- Highly portable across different processor hardware
- Not designed with specific applications in mind:
designed "by hackers, for hackers"
- "Open source" development model:
widespread sharing of kernel and user program source code
throughout the Unix user community
Contrast:
Earlier commercial OSs written in assembly language
by thousands of programmers,
designed to run specific commercial applications on specific hardware
As Thompson and Ritchie themselves point out in the paper,
many of the specific ideas they used in designing Unix
were gleaned from other,
now largely forgotten operating systems.
But UNIX is where all of these ideas came together into a single architecture
that became a model for all major subsequent operating systems.
A Hopelessly Simplified UNIX Lineage
- Direct code descendants
- Berkeley UNIX (BSD)
- Microsoft XENIX
- IBM AIX
- SGI IRIX
- SunOS/Solaris
- SCO UNIX
- ...
- Indirect code descendants:
all original UNIX code incrementally replaced,
but kernel structure largely unchanged even in details,
often down to specific kernel function and variable names.
- BSD 4.4
- FreeBSD, NetBSD, OpenBSD
- Structural descendants:
kernel code rewritten from scratch,
overall structure remains but details vary.
- Linux
- Mac OS X
- Windows NT, 2000, XP