Linux Kernel Architecture

(Jacob Rumans) #1

Chapter 1: Introduction and Overview


Handling error return codes is something that we assume goes without saying, and so we will
not pay particular attention to it. This does not imply that it is not an important thing to do, and
in fact it is: Linux would be a lousy kernel if it did not handle this issue properly. But handling
errors also obfuscates most operations without introducing any new insights, and does not make
it easier to understand the general principles of the kernel, so it’s usually better to sacrifice some
thoroughness for clarity. The kernel sources are always available for all the gory details!
❑ It is also often important to discuss kernel code directly if it is packed with important deci-
sions, and I do so when I deem it necessary. However, I often take the liberty of omitting less
interesting or purely mechanical parts, so don’t be astonished if the code presented in the book
sometimes differs slightly from the code seen in the kernel.

With respect to the source code, this bookisself-contained, but it certainly helps if it is not read on a
desolate island, but next to a computer where the Linux source code is available and can be inspected.
Besides that, being on a desolate island is not much fun anyway.

Since I base many machine-specific examples on IA-32 and AMD64, some words about these terms
are in order. ‘‘IA-32‘‘ includes all Intel-compatible CPUs such as Pentium, Athlon, and so on. AMD64
also includes the Intel variant EM64T. For the sake of simplicity, I use only the abbreviations IA-32 and
AMD64 in this book. Since Intel undoubtedly invented IA-32 and AMD came up first with the 64-bit
extensions, this seems a fair compromise. It is also interesting to note that starting with kernel 2.6.23,
both architectures are unified to the generic x86 architecture within the Linux kernel. This makes the
code easier to maintain for the developers because many elements can be shared between both variants,
but nevertheless still distinguishes between 32- and 64-bit capabilities of the processors.

1.6 Summary


The Linux kernel is one of the most interesting and fascinating pieces of software ever written, and I hope
this chapter has succeeded in whetting your appetite for the things to come in the following chapters,
where I discuss many subsystems in detail. For now, I have provided a bird’s eye view of the kernel to
present the big picture of how responsibilities are distributed, which part of the kernel has to deal with
which problems, and how the components interact with each other.

Since the kernel is a huge system, there are some issues related to the presentation of the complex mate-
rial, and I have introduced you to the particular approach chosen for this book.
Free download pdf