Preface to the 3rd edition
In a competition at this year's CeBIT, one of the questions was: which linux version came before version 0.95? I have to admit that I don't know the answer, but I know for sure that it was not 0.94.
This reminds us of the early days of linux, and the creative chaos that surrounded it. At that time it was a challenge for many co-developers of linux to understand and modify the sources of an operating system.
Since then, linux has not only reached the magical milestone of version 2.4, but also won a solid position in the highly competitive software field. With regard to the challenge of understanding an operating system, nothing has changed, in fact it has become even greater.
Many of the features added since the last milestone version not only embody the very simple functions of an operating system, but more and more functions which provide compatibility with large software products, support new hardware, or improve the performance of the system. Version 2.4 also offers exciting new concepts like IP tables and improved plug-and-play.
As with every new milestone of the linux kernel, a kernel book must also be revised to cover the new features. Despite big changes to interfaces and concepts, the book again gives an insight into the workings of linux. We hope you will not only enjoy reading it, but also enjoy experimenting with the linux kernel.
Michael Beck, Ulrich Kunitz, Harald Böhme,
Robert Magnus, Mirko Dziadzka, Claus Schröter
Berlin/Frankfurt/Furtwangen, 24. 4. 2001
Authors' preface to the 1st edition
linux has been around for about two years. What started as a programming exercise by the computer science student Linus Torvalds, has become one of the most successfulfree software projects of today, and gives serious competition to commercial systems. This is the result of the voluntary work of a worldwide programming community connected by the internet, an effective communication medium. The free availability of linux has contributed to its quick distribution. Therefore it is hard to estimate the number of linux users. In Germany there are more than ten thousand.
We discovered the linux system about 18 months ago. One result of this is that we now have a "correct" Unix system for our local PCs, without having to put thousands of dollars on the table, which, as students, we didn't have anyway.
The other, perhaps more important, benefit for us, and possibly for the majority of the linux community in the world, is the availability of the source code of the linux system. It is quite simply fun to root about in the internals of an operating system to try out your own ideas, and out of pure interest to adapt the system to your own wishes. This book is aimed at everybody who thinks the same way, but also at those who simply want to find out how a 32-bit operating system works.
The linux kernel has increased in size over time, and one can no longer obtain a good overview. Since the documentation is thin (the only documentation we know of is the outline of the linux Kernel Hackers Guide Joh95), in 1993 we started a linux seminar in the summer semester. Everybody involved in linux at our workplace, gave an insight into his or her area of interest, knowledge, and experience with "kernel hacking." In the seminar there were often discussions about modeling concepts, implementation variants, and implementation details, which were grasped in various ways. In the context of this seminar we began to write down our knowledge about the system, to make it simpler for others. This knowledge is revised and represented here.
As the development of linux progresses so quickly, we couldn't allow ourselves too much time to write the book. We therefore divided the book into chapters according to the respective area of interest of the authors. Ulrich Kunitz wrote the introduction, the chapter about memory management and the chapter about interprocess communication. Mirko Dziadzka took responsibility for the introduction to the kernel. Harald Bohme, our net expert, surely ought to have written a whole book explaining the network implementation extensively. He could only write an introduction to the matter here. The thankless task of working out the referencing of system calls and explaining system commands was given to Robert Magnus. The other authors split the rest of the chapters between them.
Identifiers from the source code are set in a sanserif font in the text. Parameters are set in an italic serif font. For example:
% make
Argument
Since not all readers of this book have access to the internet, the enclosed CD contains the Slackware distribution 1.2.0 and German LST distribution 1.7. They allow you to install corresponding startup disks from the CD, which have been produced with the assistance of the MS-DOS programs GZIP.EXE and RAWRITE.EXE. The authors would like to express their thanks to Patrick J.Volkerding and the linux support team, consisting of Ralf Flaxa and Stefan Probst, for the very extensive work that has been put into this book.
The CD contains the linux-Kernel version 1.0.91 and the sources of the programs explained in Appendix B as well as the sources of the GNU C library and the G ++ library. It also contains texts from the linux Documentation Project and the internet RFCs. The files aren't compressed and can be integrated in the directory structure in linux using the mount command.
The contents of the book correspond to our present knowledge of the linux kernel 1.0 but this knowledge is not yet complete. We would be grateful for any corrections, suggestions, notes, and comments.
We can be reached by e-mail at this address: linux@informatik.hu-berlin.de
Those who do not have access to e-mail can write to us at: linux-Team
Humboldt-Universität zu Berlin
Institut für Informatik
10099 Berlin
Linus Torvalds' Preface to the 1st Edition
Creating an operating system has been (and still is) an exciting project, and has been made even more rewarding through the extensive (and almost uniformly positive) feedback from users and developers alike.
One of the problems for people wanting to get to know the kernel internals better has been the lack of documentation, and fledgling kernel hackers have had to resort to reading the actual source code of the system for most of the details. While I think that is still a good idea, I'm happy that there is now more documentation like this which explains the use of linux and its internals.
I hope you enjoy linux and this book.
Linus Torvalds
Helsinki, 28. 4. 1994
Acknowledgments
This book would not have been possible without the work of several other people.
First we would like to thank all the linux hackers in the world, and of course Linus Torvalds. A further thank you goes to the Free Software Foundation (also known as GNU). Without GNU software, linux would not be what it is today.
We would also like to thank the employees and students at the Institute of Computer Science of the Humboldt-University of Berlin and the Faculty of Computer Science at Furtwangen Technical College who have supported us in our work.
Finally we would like to thank the innumerable copy editors, first of all Ralf Kühnel; the meticulous corrections were a great help to us.
Martin von Löwis also deserves to be mentioned, as he gave constructive criticism and supported us in the implementation of the Windows NT file system for linux.
Have a good time reading and working with linux!
Michael Beck,
Ulrich Kunitz, Harald Böh