logo资料库

Operating Systems: Internals and Design Principles (7th Edition).pdf

第1页 / 共820页
第2页 / 共820页
第3页 / 共820页
第4页 / 共820页
第5页 / 共820页
第6页 / 共820页
第7页 / 共820页
第8页 / 共820页
资料共820页,剩余部分请下载后查看
Cover
Title Page
Copyright Page
Contents
ONLINE CHAPTERS AND APPENDICES¹
Online Resources
Preface
ACKNOWLEDGMENTS
About the Author
Chapter 0 Reader’s and Instructor’s Guide
0.1 Outline of this Book
0.2 Example Systems
0.3 A Roadmap for Readers and Instructors
0.4 Internet and Web Resources
PART 1 BACKGROUND
Chapter 1 Computer System Overview
1.1 Basic Elements
1.2 Evolution of the Microprocessor
1.3 Instruction Execution
1.4 Interrupts
1.5 The Memory Hierarchy
1.6 Cache Memory
1.7 Direct Memory Access
1.8 Multiprocessor and Multicore Organization
1.9 Recommended Reading and Web Sites
1.10 Key Terms, Review Questions, and Problems
APPENDIX 1A PERFORMANCE CHARACTERISTICSOF TWO-LEVEL MEMORIES
Chapter 2 Operating System Overview
2.1 Operating System Objectives and Functions
2.2 The Evolution of Operating Systems
2.3 Major Achievements
2.4 Developments Leading to Modern Operating Systems
2.5 Virtual Machines
2.6 OS Design Considerations for Multiprocessor and Multicore
2.7 Microsoft Windows Overview
2.8 Traditional UNIX Systems
2.9 Modern UNIX Systems
2.10 Linux
2.11 Linux VServer Virtual Machine Architecture
2.12 Recommended Reading and Web Sites
2.13 Key Terms, Review Questions, and Problems
PART 2 PROCESSES
Chapter 3 Process Description and Control
3.1 What Is a Process?
3.2 Process States
3.3 Process Description
3.4 Process Control
3.5 Execution of the Operating System
3.6 Security Issues
3.7 UNIX SVR4 Process Management
3.8 Summary
3.9 Recommended Reading
3.10 Key Terms, Review Questions, and Problems
Chapter 4 Threads
4.1 Processes and Threads
4.2 Types of Threads
4.3 Multicore and Multithreading
4.4 Windows 7 Thread and SMP Management
4.5 Solaris Thread and SMP Management
4.6 Linux Process and Thread Management
4.7 Mac OS X Grand Central Dispatch
4.8 Summary
4.9 Recommended Reading
4.10 Key Terms, Review Questions, and Problems
Chapter 5 Concurrency: Mutual Exclusion and Synchronization
5.1 Principles of Concurrency
5.2 Mutual Exclusion: Hardware Support
5.3 Semaphores
5.4 Monitors
5.5 Message Passing
5.6 Readers/Writers Problem
5.7 Summary
5.8 Recommended Reading
5.9 Key Terms, Review Questions, and Problems
Chapter 6 Concurrency: Deadlock and Starvation
6.1 Principles of Deadlock
6.2 Deadlock Prevention
6.3 Deadlock Avoidance
6.4 Deadlock Detection
6.5 An Integrated Deadlock Strategy
6.6 Dining Philosophers Problem
6.7 UNIX Concurrency Mechanisms
6.8 Linux Kernel Concurrency Mechanisms
6.9 Solaris Thread Synchronization Primitives
6.10 Windows 7 Concurrency Mechanisms
6.11 Summary
6.12 Recommended Reading
6.13 Key Terms, Review Questions, and Problems
PART 3 MEMORY
Chapter 7 Memory Management
7.1 Memory Management Requirements
7.2 Memory Partitioning
7.3 Paging
7.4 Segmentation
7.5 Security Issues
7.6 Summary
7.7 Recommended Reading
7.8 Key Terms, Review Questions, and Problems
APPENDIX 7A LOADING AND LINKING
Chapter 8 Virtual Memory
8.1 Hardware and Control Structures
8.2 Operating System Software
8.3 UNIX and Solaris Memory Management
8.4 Linux Memory Management
8.5 Windows Memory Management
8.6 Summary
8.7 Recommended Reading and Web Sites
8.8 Key Terms, Review Questions, and Problems
PART 4 SCHEDULING
Chapter 9 Uniprocessor Scheduling
9.1 Types of Processor Scheduling
9.2 Scheduling Algorithms
9.3 Traditional UNIX Scheduling
9.4 Summary
9.5 Recommended Reading
9.6 Key Terms, Review Questions, and Problems
Chapter 10 Multiprocessor and Real-Time Scheduling
10.1 Multiprocessor Scheduling
10.2 Real-Time Scheduling
10.3 Linux Scheduling
10.4 UNIX SVR4 Scheduling
10.5 UNIX FreeBSD Scheduling
10.6 Windows Scheduling
10.7 Linux Virtual Machine Process Scheduling
10.8 Summary
10.9 Recommended Reading
10.10 Key Terms, Review Questions, and Problems
PART 5 INPUT/OUTPUT AND FILES
Chapter 11 I/O Management and Disk Scheduling
11.1 I/O Devices
11.2 Organization of the I/O Function
11.3 Operating System Design Issues
11.4 I/O Buffering
11.5 Disk Scheduling
11.6 RAID
11.7 Disk Cache
11.8 UNIX SVR4 I/O
11.9 Linux I/O
11.10 Windows I/O
11.11 Summary
11.12 Recommended Reading
11.13 Key Terms, Review Questions, and Problems
Chapter 12 File Management
12.1 Overview
12.2 File Organization and Access
12.3 B-Trees
12.4 File Directories
12.5 File Sharing
12.6 Record Blocking
12.7 Secondary Storage Management
12.8 File System Security
12.9 UNIX File Management
12.10 Linux Virtual File System
12.11 Windows File System
12.12 Summary
12.13 Recommended Reading
12.14 Key Terms, Review Questions, and Problems
PART 6 EMBEDDED SYSTEMS
Chapter 13 Embedded Operating Systems
13.1 Embedded Systems
13.2 Characteristics of Embedded Operating Systems
13.3 eCos
13.4 TinyOS
13.5 Recommended Reading and Web Sites
13.6 Key Terms, Review Questions, and Problems
PART 7 COMPUTER SECURITY
Chapter 14 Computer Security Threats
14.1 Computer Security Concepts
14.2 Threats, Attacks, and Assets
14.3 Intruders
14.4 Malicious Software Overview
14.5 Viruses, Worms, and Bots
14.6 Rootkits
14.7 Recommended Reading and Web Sites
14.8 Key Terms, Review Questions, and Problems
Chapter 15 Computer Security Techniques
15.1 Authentication
15.2 Access Control
15.3 Intrusion Detection
15.4 Malware Defense
15.5 Dealing with Buffer Overflow Attacks³
15.6 Windows 7 Security
15.7 Recommended Reading and Web Sites
15.8 Key Terms, Review Questions, and Problems
PART 8 DISTRIBUTED SYSTEMS
Chapter 16 Distributed Processing, Client/Server, and Clusters
16.1 Client/Server Computing
16.2 Service-Oriented Architecture
16.3 Distributed Message Passing
16.4 Remote Procedure Calls
16.5 Clusters
16.6 Windows Cluster Server
16.7 Beowulf and Linux Clusters
16.8 Summary
16.9 Recommended Reading and Web Sites
16.10 Key Terms, Review Questions, and Problems
APPENDICES
Appendix A: Topics in Concurrency
A.1 Mutual Exclusion: Software Approaches
A.2 Race Conditions and Semaphores
A.3 A Barbershop Problem
A.4 Problems
Appendix B: Programming and Operating System Projects
B.1 OS/161
B.2 Simulations
B.3 Programming Projects
B.4 Research Projects
B.5 Reading/Report Assignments
B.6 Writing Assignments
B.7 Discussion Topics
B.8 BACI
Glossary
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
References
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Z
This page intentionally left blank
OPERATING SYSTEMS INTERNALS AND DESIGN PRINCIPLES SEVENTH EDITION William Stallings 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 Prentice Hall
Editorial Director: Marcia Horton Editor in Chief: Michael Hirsch Executive Editor: Tracy Dunkelberger Assistant Editor: Melinda Haggerty Editorial Assistant: Allison Michael Director of Marketing: Patrice Jones Marketing Manager: Yezan Alayan SenioMarketing Coordinator: Kathryn Ferranti Production Manager: Pat Brown Art Director: Jayne Conte Cover Designer: Bruce Kenselaar Media Director: Daniel Sandin Media Project Manager: Wanda Rockwell Full-Service Project Management/Composition: Shiny Rajesh/Integra Software Service Pvt. Ltd. Interior Printer/Bindery: Edwards Brothers Cover Printer: Lehigh-Phoenix Color Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within text. Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. Screen shots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or affi 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. 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 p. cm. Includes bibliographical references and index. ISBN-13: 978-0-13-230998-1 (alk. paper) ISBN-10: 0-13-230998-X (alk. paper) Stallings, William. Operating systems : internals and design principles / William Stallings. — 7th ed. 1. Operating systems (Computers) QA76.76.O63S733 2011 005.4'3 dc22 I. Title. 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 Preface xi About the Author xix Chapter 0 Reader’s and Instructor’s 0.1 0.2 0.3 0.4 Guide 1 Outline of this Book 2 Example Systems 2 A Roadmap for Readers and Instructors 3 Internet and Web Resources 4 PART 1 BACKGROUND 7 Chapter 1 Computer System 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1A Overview 7 Basic Elements 8 Evolution of the Microprocessor 10 Instruction Execution 11 Interrupts 14 The Memory Hierarchy 24 Cache Memory 27 Direct Memory Access 31 Multiprocessor and Multicore Organization 33 Recommended Reading and Web Sites 36 Key Terms, Review Questions, and Problems 37 Performance Characteristics of Two-Level Memories 39 Chapter 2 Operating System Overview 46 Operating System Objectives and Functions 48 The Evolution of Operating Systems 52 Major Achievements 62 Developments Leading to Modern Operating Systems 71 Virtual Machines 74 2.1 2.2 2.3 2.4 2.5 iv 2.6 2.7 2.8 2.9 2.10 2.11 OS Design Considerations for Multiprocessor and Multicore 77 Microsoft Windows Overview 80 Traditional UNIX Systems 90 Modern UNIX Systems 92 Linux 94 Linux VServer Virtual Machine Architecture 100 2.12 Recommended Reading and Web 2.13 Sites 101 Key Terms, Review Questions, and Problems 103 PART 2 PROCESSES 106 Chapter 3 Process Description and 3.6 3.7 3.8 3.9 3.10 3.1 3.2 3.3 3.4 3.5 Control 106 What Is a Process? 108 Process States 110 Process Description 126 Process Control 134 Execution of the Operating System 140 Security Issues 143 UNIX SVR4 Process Management 147 Summary 152 Recommended Reading 152 Key Terms, Review Questions, and Problems 153 Chapter 4 Threads 157 Processes and Threads 158 Types of Threads 164 Multicore and Multithreading 171 Windows 7 Thread and SMP Management 176 Solaris Thread and SMP Management 182 Linux Process and Thread Management 186 Mac OS X Grand Central Dispatch 189 4.5 4.6 4.7 4.1 4.2 4.3 4.4
4.8 4.9 4.10 Summary 192 Recommended Reading 192 Key Terms, Review Questions, and Problems 193 5.1 5.2 Chapter 5 Concurrency: Mutual Exclu- sion and Synchronization 198 Principles of Concurrency 201 Mutual Exclusion: Hardware Support 209 Semaphores 213 Monitors 226 Message Passing 233 Readers/Writers Problem 239 Summary 243 Recommended Reading 244 Key Terms, Review Questions, and Problems 245 5.3 5.4 5.5 5.6 5.7 5.8 5.9 Chapter 6 Concurrency: Deadlock and 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 Starvation 258 Principles of Deadlock 259 Deadlock Prevention 268 Deadlock Avoidance 270 Deadlock Detection 276 An Integrated Deadlock Strategy 278 Dining Philosophers Problem 279 UNIX Concurrency Mechanisms 281 Linux Kernel Concurrency Mechanisms 285 Solaris Thread Synchronization Primitives 292 6.10 Windows 7 Concurrency Mechanisms 294 Summary 298 6.11 6.12 Recommended Reading 298 6.13 Key Terms, Review Questions, and Problems 299 PART 3 MEMORY 305 Chapter 7 Memory Management 305 7.1 Memory Management Requirements 307 Memory Partitioning 310 7.2 7.3 7.4 7.5 7.6 7.7 7.8 CONTENTS v Paging 321 Segmentation 325 Security Issues 326 Summary 330 Recommended Reading 330 Key Terms, Review Questions, and Problems 331 Loading and Linking 334 7A 8.1 8.2 8.3 Chapter 8 Virtual Memory 340 Hardware and Control Structures 341 Operating System Software 360 UNIX and Solaris Memory Management 379 Linux Memory Management 384 Windows Memory Management 386 Summary 389 Recommended Reading and Web Sites 390 Key Terms, Review Questions, and Problems 391 8.4 8.5 8.6 8.7 8.8 9.1 9.2 9.3 PART 4 SCHEDULING 395 Chapter 9 Uniprocessor Scheduling 395 Types of Processor Scheduling 396 Scheduling Algorithms 400 Traditional UNIX Scheduling 422 Summary 424 Recommended Reading 425 Key Terms, Review Questions, and Problems 426 9.4 9.5 9.6 Chapter 10 Multiprocessor and Real-Time Scheduling 430 Linux Scheduling 457 10.1 Multiprocessor Scheduling 431 10.2 Real-Time Scheduling 442 10.3 10.4 UNIX SVR4 Scheduling 461 10.5 UNIX FreeBSD Scheduling 463 10.6 Windows Scheduling 466 10.7 Linux Virtual Machine Process Scheduling 468 Summary 469 10.8
vi CONTENTS 10.9 Recommended Reading 470 10.10 Key Terms, Review Questions, and Problems 471 PART 5 INPUT/OUTPUT AND FILES 474 Chapter 11 I/O Management and Disk Scheduling 474 I/O Devices 475 11.1 11.2 Organization of the I/O Function 477 I/O Buffering 483 11.3 Operating System Design Issues 480 11.4 11.5 Disk Scheduling 487 11.6 RAID 494 11.7 Disk Cache 502 11.8 UNIX SVR4 I/O 506 11.9 11.10 Windows I/O 512 11.11 11.12 Recommended Reading 516 11.13 Key Terms, Review Questions, and Linux I/O 509 Summary 515 Problems 517 Operating Systems 576 eCos 579 TinyOS 594 13.3 13.4 13.5 Recommended Reading and 13.6 Web Sites 603 Key Terms, Review Questions, and Problems 604 PART 7 COMPUTER SECURITY 607 Chapter 14 Computer Security 14.1 Threats 607 Computer Security Concepts 608 Threats, Attacks, and Assets 610 Intruders 616 14.2 14.3 14.4 Malicious Software Overview 619 Viruses, Worms, and Bots 623 14.5 14.6 Rootkits 633 14.7 Recommended Reading and 14.8 Web Sites 635 Key Terms, Review Questions, and Problems 636 Chapter 15 Computer Security Techniques 639 Authentication 640 Access Control 646 Intrusion Detection 653 15.1 15.2 15.3 15.4 Malware Defense 657 15.5 Dealing with Buffer Overfl ow Attacks 663 15.6 Windows 7 Security 667 15.7 Recommended Reading and 15.8 Web Sites 672 Key Terms, Review Questions, and Problems 674 PART 8 DISTRIBUTED SYSTEMS 677 Chapter 16 Distributed Processing, Client/ 16.1 16.2 Server, and Clusters 677 Client/Server Computing 678 Service-Oriented Architecture 689 16.3 Distributed Message Passing 691 16.4 Remote Procedure Calls 695 16.5 Clusters 699 Chapter 12 File Management 520 12.1 Overview 522 12.2 12.3 12.4 12.5 12.6 Record Blocking 541 12.7 File Organization and Access 527 B-Trees 532 File Directories 535 File Sharing 540 Secondary Storage Management 543 File System Security 551 12.8 12.9 UNIX File Management 553 12.10 Linux Virtual File System 560 12.11 Windows File System 564 12.12 12.13 Recommended Reading 570 12.14 Key Terms, Review Questions, and Summary 569 Problems 571 PART 6 EMBEDDED SYSTEMS 573 Chapter 13 Embedded Operating 13.1 13.2 Systems 573 Embedded Systems 574 Characteristics of Embedded
分享到:
收藏