From the Author
This book was written 6 years after writing a dense and formal book on OS concepts. It preserves the deep concepts, but pushes the formal treatment into later chapters (and even then, it is simplified over the earlier material). The student begins with informal explanations for the initial concepts, then gradually works up to subject matter that is described in more formal and precise terms.
The second edition of the book* also includes an extensive set of exercises for UNIX systems as well as extended discussions and examples from Windows NT, Mach, and other research OSes. This approach was taken to balance the conceptual material with concrete exercises to apply the concepts to UNIX. There are also complementary lab manuals for Windows NT exercises and Linux kernel exercises, if the student wishes to perform more in-depth experiments.
This material is reaching maturity; it has been reviewed by many professional reviewers, used by many instructors and many students. Most "errors" that remain in the code examples are due to misinterpretation of pseudo code rather than faulty algorithms.
------------ * Note: All comments dated before January 2000 refer to the first edition of the book. --This text refers to an alternate Hardcover edition.
From the Inside Flap
The first type provides a detailed description of one or more different operating systems. This approach is particularly useful if you just want to know how a particular operating system works without learning much about how all operating systems work. The second type is an evolution of the first in that it bases all its explanation around a single pedagogical system. It usually provides enough information to derive the underlying principles of good operating systems, but these principles often are obscured by the explanation of the pedagogical system. The third type is written to be independent of any particular operating system. It focuses on the theory behind all operating systems. It tends to leave you without that important link to how an operating system is really built.
I strongly believe that it is important to understand the principles behind the designs of all operating systems and to see how those principles are put into practice in real operating systems. The goal of this book is to provide a complete discussion of theory, along with an extensive set of coding and algorithm examples. The material presented is so that the student can easily differentiate among operating systems fundamentals and the detailed coding examples. Highlighted throughout are issues of performance, since that is a fundamental factor affecting how an operating system is designed. However, the coverage of performance is not intended to be comprehensive in nature. Additional emphasis is also placed on how various parts of the system are related to real-world demand and hardware constraints. I decided to forego extensive coverage of analysis and performance theory in favor of explanation of performance issues. Students should have plenty of time to study analysis techniques in a graduate-level operating system course.
The main part of the text presents operating systems fundamentals, along with general examples. It also includes three types of examples: IN THE COCKPIT examples illustrate how to use concepts being explained in the chapter. IN THE HANGAR examples focus on how these concepts can be implemented and performance issues are highlighted in PERFORMANCE TUNING boxes. If desired, the reader could ignore these examples and and focus only on operating systems theory. Or one could browse the main text but focus primarily on these examples for a course that emphasizes a hands-on approach to operating systems.
Code Examples. The intent of including a variety of code examples is to describe operating system more concretely and provide samples of the implementation of OS theory. Sometimes these examples include descriptions at the level of programs and algorithms. A few of these code examples are complete programs that have been compiled and executed. Most examples, however, are simply descriptions of algorithms or techniques using the C programming language. These descriptions deliberately omit detail that would be necessary in an actual implementation but that do not contribute to the understanding of the algorithm. The context in which the code appears should make clear when the code is an actual implementation; otherwise it should always be assumed to be a description of an algorithm or technique. I believe that detailed descriptions are mandatory for describing operating systems. I also believe that full implementations contain so many code-specific details that the essence of the ideas being illustrated are difficult to abstract and separate from the details of the language implementation. I have experimented with using pseudo code languages for these descriptions, but students and reviewers have consistently preferred the use of C. Be careful not to interpret the descriptions in C as complete implementations
The order of presentation is based on my experience teaching operating systems courses with input from many experienced OS instructors. This organization thus reflects the combined knowledge and experience of many different teachers and I believe the result is logical, conducive to learning, and generally accepted by most operating system instructors.
Each chapter begins with a transition from the previous chapter and a preview of what is covered in the current chapter. Students can look at this material as well as the summary at the end of the chapter to get a quick idea what a chapter is about. Chapters 1-4 consist of important introductory material that provides a solid foundation for the study of operating systems. Teachers may decide to go over this material rather quickly, perhaps assigning it as outside reading material, especially if this was covered in other courses. However, understanding this material is critical before one dives into the further study of meat of operating systems starting in Chapter 5.
Chapter 1 shows how operating system; fix into software technology, in earlier drafts, an historical perspective had been included. Instructors tend to like a little history and context but many students think it is boring, so we have dispensed with history.
Chapter 2 is unique among operating system books in that it considers how to use an operating system, particularly how to use multiple processes. This chapter was added because my experience with computer science juniors and seniors is that they may have written considerable single-threaded code but are far less likely to have written or studied multithreaded software. This chapter offers an immediate opportunity to learn this new material.
Chapter 3 describes the fundamental organization of operating systems, including implementation strategies.
Chapter 4 finishes the preliminaries for studying operating systems-computer organization. For students who have already taken a computer organization class, the first half of Chapter 4 will be elementary. The second half describes interrupts, emphasizing the aspects that are critical to operating systems.
Chapter 5 describes device management, specifically general techniques, buffering, and device drivers. It is tempting to become completely immersed in Linux device drivers. However, I resisted this temptation to focus instead on a macro-level view of the purpose and general organization of interrupt-driven I/O. Included are extensive boxed sections on device drivers, but these stop short of providing an actual Linux driver. The chapter examines devices before considering processes because devices provide an elementary case in which physical concurrency exists in the computer and the software must be carefully designed to control that concurrency. This provides a natural introduction to process management.
Chapters 6-10 are devoted to process management. They start from the basic tasks and organization of process and resource managers (Chapter 6) and move to scheduling ( Chapter 7), synchronization (Chapters 8 and 9), and deadlock (Chapter 10).
Chapter 11 deals with traditional issues in memory management, while Chapter 12 covers the contemporary approach to memory manager's using virtual memory. Because of the popularity of paging, most of the discussion is directed at this technology. However, with the current trends in memory technology, it would be a mistake to ignore segmentation. Thus part of this discussion deals with segmentation. Unfortunately, the best example of a robust segmentation system is still the (now obsolete) Multics system.
Chapter 13 describes file management. Less space is devoted to file management than is customary in operating systems books because it is not as difficult to understand as process management and memory management. This discussion is augmented in Chapter 16, which deals with remote files.
Chapter 14 provides a general discussion of protection mechanisms and security policies. It might be argued that this section belongs in the process management discussion, although much of the technology is just as closely related to files, memory, and other resources. It is much easier for someone to appreciate the need for protection and security after they have seen the process, memory, and file managers.
Chapters 15-17 introduce operating system technology to support distributed computing. Distributed computing is a dominant aspect of modern operating systems and I feel strongly that coverage of this important issue belongs in all introductory texts on operating systems.
The study of operating systems has traditionally been one of the most challenging and exciting software disciplines in computer science. I hope this book makes complex aspects of operating systems easy to understand and avoids making simple aspects boring. Good luck in your study of operating systems; I hope you enjoy it as much as I do!
To the Instructor
Thank you for choosing this book as your aide in teaching undergraduates about operating systems. Operating systems continues to be an --This text refers to an alternate Hardcover edition.