1.1. Linux Versus Other Unix-Like Kernels
The various Unix-like systems on the market, some of which have a long history and show signs
of archaic practices, differ in many important respects. All commercial variants were derived from
either SVR4 or 4.4BSD, and all tend to agree on some common standards like IEEE's Portable
Operating Systems based on Unix (POSIX) and X/Open's Common Applications Environment
(CAE).
The current standards specify only an application programming interface (API)that is, a well-
defined environment in which user programs should run. Therefore, the standards do not impose
any restriction on internal design choices of a compliant kernel.
[*]
[*]
As a matter of fact, several non-Unix operating systems, such as Windows NT and its descendents, are POSIX-compliant.
To define a common user interface, Unix-like kernels often share fundamental design ideas and
features. In this respect, Linux is comparable with the other Unix-like operating systems. Reading
this book and studying the Linux kernel, therefore, may help you understand the other Unix
variants, too.
The 2.6 version of the Linux kernel aims to be compliant with the IEEE POSIX standard. This, of
course, means that most existing Unix programs can be compiled and executed on a Linux
system with very little effort or even without the need for patches to the source code. Moreover,
Linux includes all the features of a modern Unix operating system, such as virtual memory, a
virtual filesystem, lightweight processes, Unix signals , SVR4 interprocess communications,
support for Symmetric Multiprocessor (SMP) systems, and so on.
When Linus Torvalds wrote the first kernel, he referred to some classical books on Unix internals,
like Maurice Bach's The Design of the Unix Operating System (Prentice Hall, 1986). Actually,
Linux still has some bias toward the Unix baseline described in Bach's book (i.e., SVR2). However,
Linux doesn't stick to any particular variant. Instead, it tries to adopt the best features and design
choices of several different Unix kernels.
The following list describes how Linux competes against some well-known commercial Unix
kernels:
Monolithic kernel
It is a large, complex do-it-yourself program, composed of several logically different
components. In this, it is quite conventional; most commercial Unix variants are monolithic.
(Notable exceptions are the Apple Mac OS X and the GNU Hurd operating systems, both
derived from the Carnegie-Mellon's Mach, which follow a microkernel approach.)
Compiled and statically linked traditional Unix kernels
Most modern kernels can dynamically load and unload some portions of the kernel code
(typically, device drivers), which are usually called modules . Linux's support for modules is
very good, because it is able to automatically load and unload modules on demand. Among
the main commercial Unix variants, only the SVR4.2 and Solaris kernels have a similar