02-M4363-DAS1.LaTeX: “fm” — 2007/11/29 — 12:31 — page i — #1 Operating Systems A Concept-Based Approach Dhananjay M. Dhamdhere Professor of Computer Science & Engineering Indian Institute of Technology, Bombay 02-M4363-DAS1.LaTeX: “fm” — 2007/11/29 — 12:31 — page ii — #2 OPERATING SYSTEMS: A CONCEPT-BASED APPROACH Published by McGraw-Hill, a business unit of The McGraw-Hill Companies, Inc., 1221 Avenue of the Americas, New York, NY 10020. Copyright © 2009 by The McGraw-Hill Companies, Inc. All rights reserved. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of The McGraw-Hill Companies, Inc., including, but not limited to, in any network or other electronic storage or transmission, or broadcast for distance learning. Some ancillaries, including electronic and print components, may not be available to customers outside the United States. This book is printed on acid-free paper. 1 2 3 4 5 6 7 8 9 0 DOC/DOC 0 9 8 ISBN 978–0–07–295769–3 MHID 0–07–295769–7 Global Publisher: Raghothaman Srinivasan Director of Development: Kristine Tibbetts Freelance Developmental Editor: Melinda Bilecki Project Coordinator: Melissa M. Leick Lead Production Supervisor: Sandy Ludovissy Designer: Laurie B. Janssen (USE) Cover Image: S. Solum/PhotoLink/Getty Images, RF Compositor: Newgen Typeface: 10/12 Times Printer: R. R. Donnelley Crawfordsville, IN Library of Congress Cataloging-in-Publication Data Dhamdhere, Dhananjay M. Operating systems : a concept-based approach / Dhananjay M. Dhamdhere. – 1st ed. p. cm. Includes bibliographical references and index. ISBN 978–0–07–295769–3 — ISBN 0–07–295769–7 (hard copy : alk. paper) 1. Operating systems (Computers) I. Title. QA76.76.O63D5 2009 005.4′3–dc22 2007041510 www.mhhe.com 02-M4363-DAS1.LaTeX: “fm” — 2007/11/29 — 12:31 — page iii — #3 Dedication • To my wife Snehalata 02-M4363-DAS1.LaTeX: “fm” — 2007/11/29 — 12:31 — page iv — #4 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page v — #1 Brief Contents Preface xvi • Part 1 • Overview 1 1 Introduction 5 2 The OS, the Computer, and User Programs 25 3 Overview of Operating Systems 51 4 Structure of Operating Systems 80 • Part 2 • Process Management 107 5 Processes and Threads 111 6 Process Synchronization 165 7 Scheduling 228 8 Deadlocks 277 9 Message Passing 315 10 Synchronization and Scheduling in Multiprocessor Operating Systems 336 • Part 3 • Memory Management 361 11 Memory Management 363 12 Virtual Memory 410 • Part 4 • File Systems and I/O Management 477 13 File Systems 479 14 Implementation of File Operations 543 15 Security and Protection 605 • Part 5 • Distributed Operating Systems 649 16 Distributed Operating Systems 653 17 Theoretical Issues in Distributed Systems 693 18 Distributed Control Algorithms 714 19 Recovery and Fault Tolerance 743 20 Distributed File Systems 760 21 Distributed System Security 785 v 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page vi — #2 Contents Preface xvi • Part 1 • Overview 1 Chapter 1 • Introduction 5 1.1 Abstract Views of an Operating System 5 1.2 Goals of an OS 8 1.2.1 Efficient Use 8 1.2.2 User Convenience 9 1.2.3 Noninterference 10 1.3 Operation of an OS 10 1.3.1 Program Management 12 1.3.2 Resource Management 12 1.3.3 Security and Protection 14 1.4 Preview of the Book 15 1.4.1 Introduction to Operating Systems 16 1.4.2 Managing User Computations 17 1.4.3 Management of Memory 19 1.4.4 Management of Files and I/O Devices 20 1.4.5 Distributed Operating Systems 21 1.5 Summary 22 Test Your Concepts 23 Exercises 23 Bibliography 24 Chapter 2 • The OS, the Computer, and User Programs 25 2.1 Fundamental Principles of OS Operation 25 2.2 The Computer 26 2.2.1 The CPU 27 2.2.2 Memory Management Unit (MMU) 30 2.2.3 Memory Hierarchy 30 2.2.4 Input/Output 34 2.2.5 Interrupts 36 2.3 OS Interaction with the Computer and User Programs 39 2.3.1 Controlling Execution of Programs 39 2.3.2 Interrupt Servicing 40 2.3.3 System Calls 44 2.4 Summary 47 Test Your Concepts 48 Exercises 49 Bibliography 49 Chapter 3 • Overview of Operating Systems 51 3.1 Computing Environments and Nature of Computations 51 3.2 Classes of Operating Systems 54 3.3 Efficiency, System Performance, and User Service 56 3.4 Batch Processing Systems 58 vi 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page vii — #3 Contents vii 3.5 Multiprogramming Systems 59 3.5.1 Priority of Programs 61 3.6 Time-Sharing Systems 65 3.6.1 Swapping of Programs 67 3.7 Real-Time Operating Systems 68 3.7.1 Hard and Soft Real-Time Systems 69 3.7.2 Features of a Real-Time Operating System 70 3.8 Distributed Operating Systems 71 3.8.1 Special Techniques of Distributed Operating Systems 72 3.9 Modern Operating Systems 73 3.10 Summary 74 Test Your Concepts 75 Exercises 76 Bibliography 78 Chapter 4 • Structure of Operating Systems 80 4.1 Operation of an OS 80 4.2 Structure of an Operating System 82 4.2.1 Policies and Mechanisms 82 4.2.2 Portability and Extensibility of Operating Systems 82 4.3 Operating Systems with Monolithic Structure 84 4.4 Layered Design of Operating Systems 85 4.5 Virtual Machine Operating Systems 88 4.6 Kernel-Based Operating Systems 92 4.6.1 Evolution of Kernel-Based Structure of Operating Systems 94 4.7 Microkernel-Based Operating Systems 95 4.8 Case Studies 97 4.8.1 Architecture of Unix 98 4.8.2 The Kernel of Linux 99 4.8.3 The Kernel of Solaris 100 4.8.4 Architecture of Windows 101 4.9 Summary 102 Test Your Concepts 103 Exercises 104 Bibliography 104 • Part 2 • Process Management 107 Chapter 5 • Processes and Threads 111 5.1 Processes and Programs 111 5.1.1 What Is a Process? 111 5.1.2 Relationships between Processes and Programs 113 5.1.3 Child Processes 114 5.1.4 Concurrency and Parallelism 116 5.2 Implementing Processes 117 5.2.1 Process States and State Transitions 119 5.2.2 Process Context and the Process Control Block 123 5.2.3 Context Save, Scheduling, and Dispatching 125 5.2.4 Event Handling 127 5.2.5 Sharing, Communication, and Synchronization between Processes 131 5.2.6 Signals 132 5.3 Threads 134 5.3.1 POSIX Threads 138 5.3.2 Kernel-Level, User-Level, and Hybrid Threads 139 5.4 Case Studies of Processes and Threads 146 5.4.1 Processes in Unix 146 5.4.2 Processes and Threads in Linux 152 5.4.3 Threads in Solaris 154 5.4.4 Processes and Threads in Windows 157 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page viii — #4 viii Contents 5.5 Summary 160 Test Your Concepts 161 Exercises 161 Class Project: Implementing a Shell 162 Bibliography 163 Chapter 6 • Process Synchronization 165 6.1 What Is Process Synchronization? 165 6.2 Race Conditions 166 6.3 Critical Sections 170 6.3.1 Properties of a Critical Section Implementation 172 6.4 Control Synchronization and Indivisible Operations 172 6.5 Synchronization Approaches 175 6.5.1 Looping versus Blocking 175 6.5.2 Hardware Support for Process Synchronization 177 6.5.3 Algorithmic Approaches, Synchronization Primitives, and Concurrent Programming Constructs 180 6.6 Structure of Concurrent Systems 181 6.7 Classic Process Synchronization Problems 183 6.7.1 Producers − − Consumers with Bounded Buffers 183 6.7.2 Readers and Writers 186 6.7.3 Dining Philosophers 187 6.8 Algorithmic Approach to Implementing Critical Sections 190 6.8.1 Two-Process Algorithms 190 6.8.2 n-Process Algorithms 194 6.9 Semaphores 197 6.9.1 Uses of Semaphores in Concurrent Systems 198 6.9.2 Producers − − Consumers Using Semaphores 201 6.9.3 Readers − − Writers Using Semaphores 204 6.9.4 Implementation of Semaphores 205 6.10 Monitors 208 6.10.1 Monitors in Java 213 6.11 Case Studies of Process Synchronization 213 6.11.1 Synchronization of POSIX Threads 213 6.11.2 Process Synchronization in Unix 215 6.11.3 Process Synchronization in Linux 216 6.11.4 Process Synchronization in Solaris 217 6.11.5 Process Synchronization in Windows 218 6.12 Summary 220 Test Your Concepts 221 Exercises 222 Class Project 1: Interprocess Communication 224 Class Project 2: Disk Scheduler 225 Bibliography 226 Chapter 7 • Scheduling 228 7.1 Scheduling Terminology and Concepts 228 7.1.1 Fundamental Techniques of Scheduling 231 7.1.2 The Role of Priority 232 7.2 Nonpreemptive Scheduling Policies 233 7.2.1 FCFS Scheduling 233 7.2.2 Shortest Request Next (SRN) Scheduling 234 7.2.3 Highest Response Ratio Next (HRN) Scheduling 236 7.3 Preemptive Scheduling Policies 236 7.3.1 Round-Robin Scheduling with Time-Slicing (RR) 237 7.3.2 Least Completed Next (LCN) Scheduling 240 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page ix — #5 Contents ix 7.3.3 Shortest Time to Go (STG) Scheduling 241 7.4 Scheduling in Practice 242 7.4.1 Long-, Medium-, and Short-Term Schedulers 243 7.4.2 Scheduling Data Structures and Mechanisms 246 7.4.3 Priority-Based Scheduling 246 7.4.4 Round-Robin Scheduling with Time-Slicing 247 7.4.5 Multilevel Scheduling 248 7.4.6 Fair Share Scheduling 249 7.4.7 Kernel Preemptibility 250 7.4.8 Scheduling Heuristics 250 7.4.9 Power Management 251 7.5 Real-Time Scheduling 252 7.5.1 Process Precedences and Feasible Schedules 252 7.5.2 Deadline Scheduling 254 7.5.3 Rate Monotonic Scheduling 257 7.6 Case Studies 259 7.6.1 Scheduling in Unix 259 7.6.2 Scheduling in Solaris 262 7.6.3 Scheduling in Linux 263 7.6.4 Scheduling in Windows 264 7.7 Performance Analysis of Scheduling Policies 266 7.7.1 Performance Analysis through Implementation 266 7.7.2 Simulation 267 7.7.3 Mathematical Modeling 268 7.8 Summary 272 Test Your Concepts 272 Exercises 273 Bibliography 275 Chapter 8 • Deadlocks 277 8.1 What is a Deadlock? 277 8.2 Deadlocks in Resource Allocation 279 8.2.1 Conditions for a Resource Deadlock 280 8.2.2 Modeling the Resource Allocation State 281 8.3 Handling Deadlocks 285 8.4 Deadlock Detection and Resolution 286 8.4.1 A Deadlock Detection Algorithm 288 8.4.2 Deadlock Resolution 290 8.5 Deadlock Prevention 291 8.5.1 All Resources Together 293 8.5.2 Resource Ranking 294 8.6 Deadlock Avoidance 295 8.7 Characterization of Resource Deadlocks by Graph Models 301 8.7.1 Single-Instance, Single-Request (SISR) Systems 301 8.7.2 Multiple-Instance, Single-Request (MISR) Systems 302 8.7.3 Single-Instance, Multiple-Request (SIMR) Systems 303 8.7.4 Multiple-Instance, Multiple-Request (MIMR) Systems 304 8.7.5 Processes in Deadlock 305 8.8 Deadlock Handling in Practice 306 8.8.1 Deadlock Handling in Unix 307 8.8.2 Deadlock Handling in Windows 308 8.9 Summary 309 Test Your Concepts 310 Exercises 310 Bibliography 313 Chapter 9 • Message Passing 315 9.1 Overview of Message Passing 315 9.1.1 Direct and Indirect Naming 317 9.1.2 Blocking and Nonblocking Sends 318 9.1.3 Exceptional Conditions in Message Passing 319 9.2 Implementing Message Passing 320 9.2.1 Buffering of Interprocess Messages 320 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page x — #6 x Contents 9.2.2 Delivery of Interprocess Messages 321 9.3 Mailboxes 323 9.4 Higher-Level Protocols Using Message Passing 325 9.4.1 The Simple Mail Transfer Protocol (SMTP) 325 9.4.2 Remote Procedure Calls 326 9.4.3 Message Passing Standards for Parallel Programming 327 9.5 Case Studies in Message Passing 328 9.5.1 Message Passing in Unix 328 9.5.2 Message Passing in Windows 332 9.6 Summary 334 Test Your Concepts 334 Exercises 334 Bibliography 335 Chapter 10 • Synchronization and Scheduling in Multiprocessor Operating Systems 336 10.1 Architecture of Multiprocessor Systems 336 10.1.1 SMP Architecture 341 10.1.2 NUMA Architecture 342 10.2 Issues in Multiprocessor Operating Systems 343 10.3 Kernel Structure 345 10.4 Process Synchronization 347 10.4.1 Special Hardware for Process Synchronization 350 10.4.2 A Scalable Software Scheme for Process Synchronization 351 10.5 Process Scheduling 352 10.6 Case Studies 354 10.6.1 Mach 354 10.6.2 Linux 355 10.6.3 SMP Support in Windows 356 10.7 Summary 358 Test Your Concepts 358 Exercises 359 Bibliography 359 • Part 3 • Memory Management 361 Chapter 11 • Memory Management 363 11.1 Managing the Memory Hierarchy 363 11.2 Static and Dynamic Memory Allocation 365 11.3 Execution of Programs 367 11.3.1 Relocation 369 11.3.2 Linking 371 11.3.3 Program Forms Employed in Operating Systems 373 11.4 Memory Allocation to a Process 376 11.4.1 Stacks and Heaps 376 11.4.2 The Memory Allocation Model 378 11.4.3 Memory Protection 380 11.5 Heap Management 380 11.5.1 Reuse of Memory 380 11.5.2 Buddy System and Power-of-2 Allocators 386 11.5.3 Comparing Memory Allocators 389 11.5.4 Heap Management in Windows 390 11.6 Contiguous Memory Allocation 390 11.7 Noncontiguous Memory Allocation 392 11.7.1 Logical Addresses, Physical Addresses, and Address Translation 393 11.7.2 Approaches to Noncontiguous Memory Allocation 394 11.7.3 Memory Protection 395 11.8 Paging 396 11.9 Segmentation 398 11.10 Segmentation with Paging 399 11.11 Kernel Memory Allocation 400 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page xi — #7 Contents xi 11.12 Using Idle RAM Effectively 404 11.13 Summary 405 Test Your Concepts 406 Exercises 407 Bibliography 408 Chapter 12 • Virtual Memory 410 12.1 Virtual Memory Basics 410 12.2 Demand Paging 413 12.2.1 Demand Paging Preliminaries 414 12.2.2 Paging Hardware 423 12.2.3 Practical Page Table Organizations 428 12.2.4 I/O Operations in a Paged Environment 433 12.3 The Virtual Memory Manager 435 12.3.1 Overview of Operation of the Virtual Memory Handler 437 12.4 Page Replacement Policies 438 12.4.1 Practical Page Replacement Policies 444 12.5 Controlling Memory Allocation to a Process 447 12.6 Shared Pages 451 12.6.1 Copy-on-Write 453 12.7 Memory-Mapped Files 454 12.8 Case Studies of Virtual Memory Using Paging 456 12.8.1 Unix Virtual Memory 456 12.8.2 Linux Virtual Memory 459 12.8.3 Virtual Memory in Solaris 461 12.8.4 Virtual Memory in Windows 462 12.9 Virtual Memory Using Segmentation 465 12.9.1 Management of Memory 466 12.9.2 Sharing and Protection 467 12.9.3 Segmentation with Paging 468 12.10 Summary 469 Test Your Concepts 470 Exercises 471 Class Project: Simulation of Virtual Memory Manager 473 Bibliography 474 • Part 4 • File Systems and I/O Management 477 Chapter 13 • File Systems 479 13.1 Overview of File Processing 479 13.1.1 File System and the IOCS 481 13.1.2 File Processing in a Program 482 13.2 Files and File Operations 483 13.3 Fundamental File Organizations and Access Methods 484 13.3.1 Sequential File Organization 485 13.3.2 Direct File Organization 485 13.3.3 Index Sequential File Organization 486 13.3.4 Access Methods 488 13.4 Directories 488 13.4.1 Directory Trees 490 13.4.2 Directory Graphs 492 13.4.3 Operations on Directories 493 13.4.4 Organization of Directories 493 13.5 Mounting of File Systems 495 13.6 File Protection 497 13.7 Allocation of Disk Space 498 13.7.1 Linked Allocation 499 13.7.2 Indexed Allocation 500 13.7.3 Performance Issues 502 13.8 Interface Between File System and IOCS 503 13.9 File Processing 506 13.9.1 File System Actions at open 506 13.9.2 File System Actions during a File Operation 509 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page xii — #8 xii Contents 13.9.3 File System Actions at close 509 13.10 File Sharing Semantics 510 13.11 File System Reliability 513 13.11.1 Loss of File System Consistency 513 13.11.2 Approaches to File System Reliability 515 13.12 Journaling File System 523 13.13 Virtual File System 524 13.14 Case Studies of File Systems 526 13.14.1 Unix File System 526 13.14.2 Linux File System 530 13.14.3 Solaris File System 531 13.14.4 Windows File System 531 13.15 Performance of File Systems 534 13.15.1 Log-Structured File System 536 13.16 Summary 537 Test Your Concepts 538 Exercises 539 Bibliography 541 Chapter 14 • Implementation of File Operations 543 14.1 Layers of the Input-Output Control System 543 14.2 Overview of I/O Organization 545 14.3 I/O Devices 547 14.3.1 Magnetic Tapes 550 14.3.2 Magnetic Disks 552 14.3.3 Data Staggering Techniques 554 14.3.4 Disk Attachment Technologies 559 14.3.5 RAID 561 14.3.6 Optical Disks 565 14.4 Device-Level I/O 566 14.4.1 I/O Programming 567 14.5 The Physical IOCS 569 14.5.1 Logical Devices 569 14.5.2 Physical IOCS Data Structures 570 14.5.3 Organization of Physical IOCS 571 14.5.4 Implementation of Physical IOCS 572 14.6 Device Drivers 574 14.7 Disk Scheduling 576 14.8 Buffering of Records 579 14.9 Blocking of Records 584 14.10 Access Methods 587 14.11 Disk and File Caches 588 14.12 Unified Disk Cache 591 14.13 Case Studies 592 14.13.1 Unix 592 14.13.2 Linux 595 14.13.3 File Processing in Windows 596 14.14 Summary 599 Test Your Concepts 600 Exercises 601 Bibliography 602 Chapter 15 • Security and Protection 605 15.1 Overview of Security and Protection 605 15.1.1 Goals of Security and Protection 609 15.1.2 Security and Protection Threats 609 15.2 Security Attacks 610 15.2.1 Trojan Horses, Viruses, and Worms 611 15.2.2 The Buffer Overflow Technique 613 15.3 Formal Aspects of Security 615 15.4 Encryption 617 15.4.1 Attacks on Cryptographic Systems 619 15.4.2 Encryption Techniques 620 15.5 Authentication and Password Security 623 15.6 Protection Structures 625 15.6.1 Granularity of Protection 626 15.6.2 Access Control Matrix 627 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page xiii — #9 Contents xiii 15.6.3 Access Control Lists (ACLs) 627 15.6.4 Capability Lists (C-lists) 628 15.6.5 Protection Domain 629 15.7 Capabilities 630 15.7.1 Capability-Based Computer Systems 631 15.7.2 Software Capabilities 633 15.7.3 Problem Areas in the Use of Capabilities 635 15.8 Classifications of Computer Security 636 15.9 Case Studies in Security and Protection 638 15.9.1 MULTICS 638 15.9.2 Unix 639 15.9.3 Linux 640 15.9.4 Security and Protection in Windows 641 15.10 Summary 643 Test Your Concepts 644 Exercises 644 Bibliography 645 • Part 5 • Distributed Operating Systems 649 Chapter 16 • Distributed Operating Systems 653 16.1 Features of Distributed Systems 653 16.2 Nodes of Distributed Systems 655 16.3 Integrating Operation of Nodes of a Distributed System 656 16.4 Reliable Interprocess Communication 659 16.4.1 Naming of Processes 660 16.4.2 IPC Semantics 661 16.4.3 IPC Protocols 662 16.5 Distributed Computation Paradigms 665 16.5.1 Client − − Server Computing 667 16.5.2 Remote Procedure Calls 668 16.5.3 Remote Evaluation 670 16.5.4 Case Studies 671 16.6 Networking 672 16.6.1 Types of Networks 672 16.6.2 Network Topology 674 16.6.3 Networking Technologies 675 16.6.4 Connection Strategies 678 16.6.5 Routing 680 16.6.6 Network Protocols 681 16.6.7 Network Bandwidth and Latency 684 16.7 Model of a Distributed System 685 16.8 Design Issues in Distributed Operating Systems 687 16.9 Summary 689 Test Your Concepts 690 Exercises 691 Bibliography 691 Chapter 17 • Theoretical Issues in Distributed Systems 693 17.1 Notions of Time and State 693 17.2 States and Events in a Distributed System 694 17.2.1 Local and Global States 694 17.2.2 Events 695 17.3 Time, Clocks, and Event Precedences 695 17.3.1 Event Precedence 696 17.3.2 Logical Clocks 697 17.3.3 Vector Clocks 700 17.4 Recording the State of a Distributed System 702 17.4.1 Properties of a Consistent State Recording 703 17.4.2 An Algorithm for Consistent State Recording 706 17.5 Summary 710 Test Your Concepts 711 Exercises 712 Bibliography 713 02-M4363-DAS1.LaTeX: “contents” — 2007/11/29 — 15:07 — page xiv — #10 xiv Contents Chapter 18 • Distributed Control Algorithms 714 18.1 Operation of Distributed Control Algorithms 714 18.2 Correctness of Distributed Control Algorithms 717 18.3 Distributed Mutual Exclusion 718 18.3.1 A Permission-Based Algorithm 718 18.3.2 Token-Based Algorithms for Mutual Exclusion 720 18.4 Distributed Deadlock Handling 723 18.4.1 Problems in Centralized Deadlock Detection 724 18.4.2 Distributed Deadlock Detection 724 18.4.3 Distributed Deadlock Prevention 728 18.5 Distributed Scheduling Algorithms 728 18.6 Distributed Termination Detection 732 18.7 Election Algorithms 735 18.8 Practical Issues in Using Distributed Control Algorithms 736 18.8.1 Resource Management 736 18.8.2 Process Migration 738 18.9 Summary 739 Test Your Concepts 740 Exercises 740 Bibliography 741 Chapter 19 • Recovery and Fault Tolerance 743 19.1 Faults, Failures, and Recovery 743 19.1.1 Classes of Faults 745 19.1.2 Overview of Recovery Techniques 746 19.2 Byzantine Faults and Agreement Protocols 747 19.3 Recovery 748 19.4 Fault Tolerance Techniques 750 19.4.1 Logs, Forward Recovery, and Backward Recovery 750 19.4.2 Handling Replicated Data 751 19.4.3 Handling Distributed Data 753 19.5 Resiliency 754 19.6 Summary 756 Test Your Concepts 757 Exercises 757 Bibliography 758 Chapter 20 • Distributed File Systems 760 20.1 Design Issues in Distributed File Systems 760 20.1.1 Overview of DFS Operation 762 20.2 Transparency 763 20.3 Semantics of File Sharing 764 20.4 Fault Tolerance 765 20.4.1 Availability 766 20.4.2 Client and Server Node Failures 768 20.4.3 Stateless File Servers 769 20.5 DFS Performance 770 20.5.1 Efficient File Access 770 20.5.2 File Caching 771 20.5.3 Scalability 774 20.6 Case Studies 774 20.6.1 Sun Network File System 774 20.6.2 Andrew and Coda File Systems 777 20.6.3 GPFS 779 20.6.4 Windows 781 20.7 Summary 781 Test Your Concepts 782 Exercises 783 Bibliography 783 Chapter 21 • Distributed System Security 785 21.1 Issues in Distributed System Security 785