Transcription of William Stallings - Operating Systems
1 This page intentionally left blank Operating Systems . INTERNALS AND DESIGN. PRINCIPLES. SEVENTH EDITION. William Stallings Prentice Hall Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City S o Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Editorial Director: Marcia Horton Art Director: Jayne Conte Editor in Chief: Michael Hirsch Cover Designer: Bruce Kenselaar Executive Editor: Tracy Dunkelberger Media Director: Daniel Sandin Assistant Editor: Melinda Haggerty Media Project Manager.
2 Wanda Rockwell Editorial Assistant: Allison Michael Full-Service Project Management/Composition: Director of Marketing: Patrice Jones Shiny Rajesh/Integra Software Service Pvt. Ltd. Marketing Manager: Yezan Alayan Interior Printer/Bindery: Edwards Brothers SenioMarketing Coordinator: Kathryn Ferranti Cover Printer: Lehigh-Phoenix Color Production Manager: Pat Brown Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within text.
3 Microsoft and Windows are registered trademarks of the Microsoft Corporation in the and other countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or af liated with the Microsoft Corporation. Copyright 2012, 2009, 2005, 2001, 1998 Pearson Education, Inc., publishing as Prentice Hall, 1 Lake Street, Upper Saddle River, New Jersey, 07458. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise.
4 To obtain permission(s) to use material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, 1 Lake Street, Upper Saddle River, New Jersey, 07458. Many of the designations by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in initial caps or all caps. Library of Congress Cataloging-in-Publication Data Stallings , William .
5 Operating Systems : internals and design principles / William Stallings . 7th ed. p. cm. Includes bibliographical references and index. ISBN-13: 978-0-13-230998-1 (alk. paper). ISBN-10: 0-13-230998-X (alk. paper). 1. Operating Systems (Computers) I. Title. 2011. '3 dc22. 2010048597. 10 9 8 7 6 5 4 3 2 1 EB 15 14 13 12 11. ISBN 10: 0-13-230998-X. ISBN 13: 978-0-13-230998-1. To my brilliant and brave wife, Antigone Tricia, who has survived the worst horrors imaginable. CONTENTS. Online Resources x OS Design Considerations for Preface xi Multiprocessor and Multicore 77.
6 Microsoft Windows Overview 80. About the Author xix Traditional UNIX Systems 90. Chapter 0 Reader's and Instructor's Modern UNIX Systems 92. Guide 1 Linux 94. Outline of this Book 2 Linux VServer Virtual Machine Example Systems 2 Architecture 100. A Roadmap for Readers and Recommended Reading and Web Instructors 3 Sites 101. Internet and Web Resources 4 Key Terms, Review Questions, and Problems 103. PART 1 BACKGROUND 7. Chapter 1 computer System PART 2 PROCESSES 106. Overview 7 Chapter 3 Process Description and Basic Elements 8 Control 106.
7 Evolution of the What Is a Process? 108. Microprocessor 10 Process States 110. Instruction Execution 11 Process Description 126. Interrupts 14 Process Control 134. The Memory Hierarchy 24 Execution of the Operating Cache Memory 27 System 140. Direct Memory Access 31 Security Issues 143. Multiprocessor and Multicore UNIX SVR4 Process organization 33 Management 147. Recommended Reading and Summary 152. Web Sites 36 Recommended Reading 152. Key Terms, Review Questions, Key Terms, Review Questions, and and Problems 37 Problems 153.
8 1A Performance Characteristics of Chapter 4 Threads 157. Two-Level Memories 39 Processes and Threads 158. Chapter 2 Operating System Types of Threads 164. Overview 46 Multicore and Multithreading 171. Operating System Objectives and Windows 7 Thread and SMP. Functions 48 Management 176. The Evolution of Operating Solaris Thread and SMP. Systems 52 Management 182. Major Achievements 62 Linux Process and Thread Developments Leading to Modern Management 186. Operating Systems 71 Mac OS X Grand Central Virtual Machines 74 Dispatch 189.
9 Iv CONTENTS v Summary 192 Paging 321. Recommended Reading 192 Segmentation 325. Key Terms, Review Questions, and Security Issues 326. Problems 193 Summary 330. Chapter 5 Concurrency: Mutual Exclu- Recommended Reading 330. sion and Synchronization 198 Key Terms, Review Questions, and Problems 331. Principles of Concurrency 201. 7A Loading and Linking 334. Mutual Exclusion: Hardware Support 209 Chapter 8 Virtual Memory 340. Semaphores 213 Hardware and Control Monitors 226 Structures 341. Message Passing 233 Operating System Software 360.
10 Readers/Writers Problem 239 UNIX and Solaris Memory Summary 243 Management 379. Recommended Reading 244 Linux Memory Management 384. Key Terms, Review Questions, Windows Memory and Problems 245 Management 386. Chapter 6 Concurrency: Deadlock and Summary 389. Starvation 258 Recommended Reading and Web Sites 390. Principles of Deadlock 259. Key Terms, Review Questions, Deadlock Prevention 268. and Problems 391. Deadlock Avoidance 270. Deadlock Detection 276 PART 4 SCHEDULING 395. An Integrated Deadlock Chapter 9 Uniprocessor Scheduling 395.