




























































































Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Prepara tus exámenes
Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Prepara tus exámenes con los documentos que comparten otros estudiantes como tú en Docsity
Los mejores documentos en venta realizados por estudiantes que han terminado sus estudios
Estudia con lecciones y exámenes resueltos basados en los programas académicos de las mejores universidades
Responde a preguntas de exámenes reales y pon a prueba tu preparación
Consigue puntos base para descargar
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Comunidad
Pide ayuda a la comunidad y resuelve tus dudas de estudio
Descubre las mejores universidades de tu país según los usuarios de Docsity
Ebooks gratuitos
Descarga nuestras guías gratuitas sobre técnicas de estudio, métodos para controlar la ansiedad y consejos para la tesis preparadas por los tutores de Docsity
Silberschatz - Manual de sistemas operativos
Tipo: Apuntes
1 / 1251
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!
Yale University
PETER BAER GALVIN
Corporate Technologies, Inc.
GREG GAGNE
Westminster College
SIXTH EDITION
Paul Crockett
MARKETING MANAGER
Ilse Wolfe
SENIOR PRODUCTION EDITOR
Ken Santor
COVER DESIGNER
Madelyn Lesure
To my parents, Marlene and Roland, my wife, Pat, and my sons, Tom and Jay
Greg Gagne
An operating system is a program that acts as an intermediary between the user of a computer and the computer hardware. The purpose of an operating system is to provide an environment in which a user can execute programs in a convenient and efficient manner.
Understanding the evolution of operating systems gives us an appreciation for what an operating system does and how it does it. We trace the development of operating systems from the first hands-on systems, through multiprogrammed and time-shared systems, to current handheld and real-time systems.
The operating system must ensure the correct operation of the computer system. The hardware must provide appropriate mechanisms to prevent user programs from interfering with the proper operation of the system. We describe the basic computer architecture taht makes it possible to write a correct operating system.
The operating system provides certain services to programs and to the users of those programs in order to make their tasks easier. The services differ from one operating system to another, but we identify and explore some common classes of these services.
A process can be thought of as a program in execution. A process will needcertain resources - such as CPU time, memory files, and I/O devices - to accomplish its task. These resources are allocated to the process either when it is created or while it is executing.
A process is the unit of work in most systems. Such a system consists of a collection of processes: Operating-system processes execute system code, and user processes execute user code. All these processes may execute concurrently.
Although traditionally, a process contained only a single thread of control as it ran, most modern operating systems now support processes that have multiple threads.
the operating system is responsible for the following activities in connection with process and thread management: the creation and deletion of both user and system processes; the scheduling of processes; and the provision of mechanisms for synchronization, communication, and deadlock handling for processes.
by the operating system onto physical devices. Files are normally organized into directories to ease their use.
The devices that attach to a computer vary in many aspects. Some devices transfer a character or a block of characters at a time. Some can be accessed only sequentially, others randomly. Some transfer data synchronously, others asynchronously. Some are dedicated, some shared. They can be read-only or read-write. they vary greatly in speed. In many ways they are also the slowest major component of the computer.
Because of all this device variation, the operating system needs to provide a wide range of functionality to applications, to alllow them to control all aspects of the devices. One key goal of an operating system's I/O subsystem is to provide the simplest interface possible to the rest of the system. Because devices are a performance bottleneck, another key is to optimize I/O for maximum concurrency. We initially describe the myriad variations of I/O devices and the ways in which ooperating systems control them. Afterwards we discuss the more complicated I/O devices used for secondary and tertiary storage, and we explain the special attention that operating systems muct give them.
A distributed system is a collection of processors that do not share memory or a clock. Instead, each processor has its own local memory, and the processors communicate well with each other through communication lines such as local- or wide-area networks. The processors in a distributed system vary in size and function. Such systems may include small handheld or real-time devices, personal computers, workstations, and large mainframe computer systems.
The benefits of a distributed system include user access to the resources maintained by the system and therefore computation speedup and improved data availability and reliability. A distributed file system is a file-service system whole users, servers, and storage devices are dispersed among the sites of a distributed system. Accordingly, service activity has to be carried outacross the network; instead of a single centralized data repository, there are multiple and independent storage devices.
Because a system is distributed, however, it must provide mechanisms for process synchronization and communication, for dealing with the deadlock problems, and for dealing with failures that are not encountered in a centralized system.
We can now integrate the concepts described in this book by describing real operating systems. Two such systems are covered in great detail—Linux and Windows XP. We chose Linux for several reasons: it is popular, it is freely available, and it has a representation of a full-featured UNIX system. This provides a student of operating systems an opportunity to read—and modify — real operating system source code.
We also cover Windows XP in great detail. This recent operating system from Microsoft is gaining popularity, not only for the stand-alone-machine market, but also in the workgroup–server market. We chose Windows XP because it provides an opportunity for us to study a modern operating system that has a design and implementation drastically different from those of UNIX.
In addition, we briefly discuss other highly influential operating systems. We have chosen the order of presentation to highlight the similarities and differences among the systems; it is not strictly chronological and does not reflect the relative importance of the system.
Finally, we provide on-line coverage of three other systems. The FreeBSD system is another UNIX system. However, whereas Linux adopted the approach of combining
features from several UNIX systems, FreeBSD is based upon the BSD model of UNIX. Like Linux, FreeBSD source code is freely available. The Mach operating system is a modern operating system that provides compatibility with BSD UNIX. Windows 2000 is another modern operating system from Microsoft for Intel Pentium and later microprocessors, which is compatible with MS-DOS and Microsoft Windows applications.
The text is organized in seven major parts:
This book uses Java to illustrate many operating-system concepts, such as multitasking, CPU scheduling, process synchronization, deadlock, security, and distributed systems. Java is more a technology than a programming language, so it is an excellent vehicle for demonstrations.
Java was originally developed as a language to program microprocessors in consumer devices such as cellular telephones and set-top boxes. The advent of the Web in the mid-1990s showed the Java team at Sun Microsystems the language's potential usefulness across the Internet: Programmers can use Java to write applications and applets —programs that run on web pages. Java also provides support for development of database applications, graphical user interfaces (GUI s), reusable objects, and two-dimensional and three-dimensional modeling, to name a few. All such programs can run on a single computer or on a distributed system across the Internet.
We provide an overview of Java technology in Chapter 3 and illustrate the creation and coordination of multithreaded Java programs in Chapters 5 and 7. In Chapter 4, we use Java to demonstrate how different processes can communicate using shared memory and message passing. In Chapter 6, we use Java to demonstrate (^) CPU - scheduling algorithms; in Chapter 8, we illustrate deadlock and deadlock-recovery methods using Java. Chapters 10 and 11 use Java to demonstrate memory-mapped I /O and file locking, respectively. Java programs are used in Chapter 4 to illustrate
The web page for the book contains such material as a set of slides to accompany the book, model course syllabi, Java source code, and up-to-date errata. The web page also contains the book's three case study appendices, the Java Primer appendix, and the Distributed Communication appendix (Chapter 15 from AOSC. The URL is:
http://www.os-book.com
To obtain restricted supplements, contact your local John Wiley & Sons sales representative. You can find your representative at the "Find a Rep?" web page: http://www.jsw-edcv.wiley.com/college/findarep.
We have switched to the mailman system for communication among the users of Operating System Concepts. If you wish to use this facility, please visit the following URL and follow the instructions there to subscribe:
http://mailman.cs.yale.edu/mailman/listinfo/os-book-list
The mailman mailing list system provides many benefits, such as an archive of postings, and several subscription options, including digest and Web only. To send messages to the list, send e-mail to:
os-book-list@cs.yale.edu
Depending on the message, we will either reply to you personally or forward the message to everyone on the mailing list. The list is moderated, so you will receive no inappropriate mail.
Students who are using this book as a text for class should not use the list to ask for answers to the exercises. They will not be provided.
We have attempted to clean up every error in this new edition, but—as happens with operating systems—a few obscure bugs may remain. We would appreciate hearing from you about any textual errors or omissions that you identify.
If you would like to suggest improvements or to contribute exercises, we would also be glad to hear from you. Please send correspondence to os-book@cs.yale.edu.
This book is derived from the previous editions, the first three of which were coauthored by James Peterson. Others who helped us with previous editions include Hamid Arabnia, Rida Bazzi, Randy Bentson, David Black, Joseph Boykin, Jeff Brumfield, Gael Buckley, Roy Campbell, P. C. Capon, John Carpenter, Gil Carrick, Thomas Casavant, Ajoy Kumar Datta, Joe Deck, Sudarshan K. Dhall, Thomas Doeppner, Caleb Drake, M. Raşit Eskicioğlu, Hans Flack, Robert Fowler, G. Scott Graham, Richard Guy, Max Hailperin, Rebecca Hartman, Wayne Hathaway, Christopher Haynes, Mark Holliday, Ahmed Kamel, Richard Kieburtz, Carol Kroll, Morty Kwestel, Thomas LeBlanc, John Leggett, Jerrold Leichter, Ted Leung, Gary Lippman, Carolyn Miller, Michael Molloy, Yoichi Muraoka, Jim M. Ng, Banu Özden, Ed Posnak, Boris Putanec, Charles Qualline, John Quarterman, Gustavo Rodriguez- Rivera, Carolyn J. C. Schauble, Thomas P. Skinner, Yannis Smaragdakis, Jesse St. Laurent, John Stankovic, Adam Stauffer, Steven Stepanek, Hal Stern, Louis Stevens, Pete Thomas, David Umbaugh, Steve Vinoski, Tommy Wagner, Larry L. Wear, John Werth, James M. Westall, J. S. Weston, and Yang Xiang
We thank the following people who contributed to this edition of the book: Bruce Hillyer reviewed and helped with the rewrite of Chapters 2, 12, 13, and 14. Mike Reiter reviewed and helped with the rewrite of Chapter 18. Parts of Chapter 14 were derived from a paper by Hillyer and Silberschatz [1996]. Parts of Chapter 17 were derived from a paper by Levy and Silberschatz [1990]. Chapter 20 was derived from an unpublished manuscript by Stephen Tweedie. Chapter 21 was derived from an unpublished manuscript by Dave Probert, Cliff Martin, and Avi Silberschatz. Appendix C was derived from an unpublished manuscript by Cliff Martin. Cliff Martin also helped with updating the UNIX appendix to cover F ree BSD. Mike Shapiro reviewed the Solaris information, and Jim Mauro answered several Solaris-related questions.
We thank the following people who reviewed this version of the book: Djamel Bouchaffra, Tom Boyd, Daren Che, Robert Chun, John Collins, Douglas Jones, Ben Miller, Paul Lu, Gustavo Rodriguez-Rivera, Carolyn Schauble, Charles Shub, Dan Stanzione, Paul Stelling
Our Acquisitions Editor, Paul Crockett, provided expert guidance as we prepared this edition. Paul was assisted by Simon Durkin, who managed many details of this project smoothly. The Senior Production Editor was Ken Santor. The cover illustrator was Susan Cyr, and the cover designer was Madelyn Lesure. Barbara Heaney was in charge of overseeing the copy editing, and Beverly Peavler copy-edited the