ebook img

Distributed Systems Principles and Paradigms PDF

702 Pages·2008·9.37 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Distributed Systems Principles and Paradigms

DISTRIBUTED SYSTEMS Second Edition About the Authors Andrew S. Tanenbaum has an S.B. degree from M.LT. and a Ph.D. from the University of California at Berkeley. He is currently a Professor of Computer Science at the Vrije Universiteit in Amsterdam, The Netherlands, where he heads the Computer Systems Group. Until stepping down in Jan. 2005, for 12 years he had been Dean of the Advanced School for Computing and Imaging, an interuniversity graduate school doing research on advanced parallel, distributed, and imaging systems. In the past. he has done research on compilers, operating systems, networking, and local-area distributed systems. His current research focuses primarily on computer secu- rity, especially in operating systems, networks, and large wide-area distributed systems. Together, all these research projects have led to over 125 refereed papers in journals and conference proceedings and five books, which have been translated into 21 languages. Prof. Tanenbaum has also produced a considerable volume of software. He was the principal architect of the Amsterdam Compiler Kit, a toolkit for writing portable com- pilers, as well as of MINIX, a small UNIX clone aimed at very high reliability. It is avail- able for free at www.minix3.org.This system provided the inspiration and base on which Linux was developed. He was also one of the chief designers ofAmoeba and Globe. His Ph.D. students have gone on to greater glory after getting their degrees. He is very proud of them. In this respect he resembles a mother hen. Prof. Tanenbaum is a Fellow of the ACM, a Fellow of the the IEEE, and a member of the Royal Netherlands Academy of Arts and Sciences. He is also winner of the 1994 ACM Karl V. Karlstrom Outstanding Educator Award, winner of the 1997 ACM/SIGCSE Award for Outstanding Contributions to Computer Science Education, and winner of the 2002 Texty award for excellence in textbooks. In 2004 he was named as one of the five new Academy Professors by the Royal Academy. His home page is at www.cs.vu.nl/r-ast. Maarten van Steen is a professor at the Vrije Universiteit, Amsterdam, where he teaches operating systems, computer networks, and distributed systems. He has also given various highly successful courses on computer systems related subjects to ICT professionals from industry and governmental organizations. Prof. van Steen studied Applied Mathematics at Twente University and received a Ph.D. from Leiden University in Computer Science. After his graduate studies he went to work for an industrial research laboratory where he eventually became head of the Com- puter Systems Group, concentrating on programming support for parallel applications. After five years of struggling simultaneously do research and management, he decided to return to academia, first as an assistant professor in Computer Science at the Erasmus University Rotterdam, and later as an assistant professor in Andrew Tanenbaum's group at the Vrije Universiteit Amsterdam. Going back to university was the right decision; his wife thinks so, too. His current research concentrates on large-scale distributed systems. Part of his research focuses on Web-based systems, in particular adaptive distribution and replication in Globule, a content delivery network of which his colleague Guillaume Pierre is the chief designer. Another subject of extensive research is fully decentralized (gossip-based) peer- to-peer systems of which results have been included in Tribler, a BitTorrent application developed in collaboration with colleagues from the Technical University of Delft. DISTRIBUTED SYSTEMS Second Edition ' Andrew S.Tanenbaum Maarten Van Steen Upper Saddle River, NJ 07458 Library of Congress Ca.aloging-in.Public:ation Data Tanenbaum. Andrew S. Distributed systems: principles and paradigms IAndrew S.Tanenbaum, Maarten Van Steen. p. em. Includes bibliographical references and index. ISBN 0-13-239227-5 1. Electronic data processing--Distributed processing. 2. Distributed operating systems (Computers) I. Steen, Maarten van. II.Title. QA76.9.D5T36 2006 005.4'476--dc22 2006024063 Vice President and Editorial Director. ECS: Marcia J.Horton Executive Editor: Tracy Dunkelberger Editorial Assistant: Christianna Lee Associtate Editor: Carole Stivder Executive Managing Editor: 'Vince O'Brien Managing Editor: CsmilleTremecoste Production Editor: CraigLittle Director of Creative Services: PaulBelfanti Creative Director: Juan Lopez Art Director: Heather Scott Cover Designer: Tamara Newnam Art Editor: Xiaohong Zhu Manufacturing Manager, ESM: Alexis Heydt-Long Manufacturing Buyer: Lisa McDowell Executive Marketing Manager: Robin O'Brien Marketing Assistant: Mack Patterson ©2007Pearson Education. Inc. Pearson Prentice Hall Pearson Education, Inc. Upper Saddle River, NJ 07458 All rights reserved. No part ofthis book may be reproduced in any form or by anymeans, without permission in writing from the publisher. Pearson Prentice Hall~ isatrademark ofPearson Education, Inc. The author and publisher ofthis book have used their best efforts inpreparing this book. These efforts include the development, research, and testing ofthe theories and programs to determine their effectiveness. The author and publisher make nowarranty ofanykind, expressed or implied, with regard to these programs orthe documentation contained inthis book. The author and publisher shall not be liable in any event for incidental orconsequential damages inconnection with, or arising out of, the furnishing, performance, or use ofthese programs. Printed in the United States ofAmerica 10 9 8 7 6 5 4 3 2 1 ISBN: 0-13-239227-5 Pearson Education Ltd., London Pearson Education Australia Pty. Ltd., Sydney Pearson Education Singapore, Pte. Ltd. Pearson Education North Asia Ltd., Hong Kong Pearson Education Canada, Inc., Toronto Pearson Educaci6n de Mexico, S.A. de C.V. Pearson Education-Japan, Tokyo Pearson Education Malaysia, Pte. Ltd. Pearson Education, Inc., Upper Saddle River, New Jersey To Suzanne, Barbara, Marvin, and the memory of Bram and Sweetie 1t -AST To Marielle, Max, and Elke -MvS CONTENTS PREFACE xvii 1 INTRODUCTION 1 1.1 DEFINITION OF A DISTRIBUTED SYSTEM 2 1.2 GOALS 3 1.2.1 Making Resources Accessible 3 1.2.2 Distribution Transparency 4 1.2.3 Openness 7 1.2.4 Scalability 9 1.2.5 Pitfalls 16 1.3 TYPES OF DISTRIBUTED SYSTEMS 17 1.3.1 Distributed Computing Systems 17 1.3.2 Distributed Information Systems 20 1.3.3 Distributed Pervasive Systems 24 1.4 SUMMARY 30 2 ARCHITECTURES 33 2.1 ARCHITECTURAL STYLES 34 2.2 SYSTEM ARCHITECTURES 36 2.2.1 Centralized Architectures 36 2.2.2 Decentralized Architectures 43 2.2.3 Hybrid Architectures 52 2.3 ARCHITECTURES VERSUS MIDDLEWARE 54 2.3.1 Interceptors 55 2.3.2 General Approaches to Adaptive Software 57 2.3.3 Discussion 58 vii viii CONTENTS 2.4 SELF-MANAGEMENT IN DISTRIBUTED SYSTEMS 59 2.4.1 The Feedback Control Model 60 2.4.2 Example: Systems Monitoring with Astrolabe 61 2.4.3 Example: Differentiating Replication Strategies in Globule 63 2.4.4 Example: Automatic Component Repair Management in Jade 65 2.5 SUMMARY 66 3 PROCESSES 69 3.1 THREADS 70 3.1.1 Introduction to Threads 70 3.1.2 Threads in Distributed Systems 75 3.2 VIRTUALIZATION 79 3.2.1 The Role of Virtualization in Distributed Systems 79 3.2.2 Architectures of Virtual Machines 80 3.3 CLIENTS 82 3.3.1 Networked User Interfaces 82 3.3.2 Client-Side Software for Distribution Transparency 87 3.4 SERVERS 88 3.4.1 General Design Issues 88 3.4.2 Server Clusters 92 3.4.3 Managing Server Clusters 98 3.5 CODE MIGRATION 103- 3.5.1 Approaches to Code Migration 103 3.5.2 Migration and Local Resources 107 3.5.3 Migration in Heterogeneous Systems 110 3.6 SUMMARY 112 -4 115 COMMUNICATION 4.1 FUNDAMENTALS 116 4.1.1 Layered Protocols 116 4.1.2 Types of Communication 124 4.2 REMOTE PROCEDURE CALL 125 4.2.1 Basic RPC Operation 126 4.2.2 Parameter Passing 130 ix CONTENTS 4.2.3 Asynchronous RPC 134 4.2.4 Example: DCE RPC 135 4.3 MESSAGE-ORIENTED COMMUNICATION 140 4.3.1 Message-Oriented Transient Communication 141 4.3.2 Message-Oriented Persistent Communication 145 4.3.3 Example: ffiM's WebSphere Message-Queuing System 152 4.4 STREAM-ORIENTED COMMUNICATION 157 ,4.4.1 Support for Continuous Media 158 4.4.2 Streams and Quality of Service 160 4.4.3 Stream Synchronization 163 4.5 MULTICAST COMMUNICATION 166 4.5.1 Application-Level Multicasting 166 4.5.2 Gossip-Based Data Dissemination 170 4.6 SUMMARY 175 5 NAMING 179 5.1 NAMES, IDENTIFIERS, AND ADDRESSES 180 5.2 FLAT NAMING 182 5.2.1 Simple Solutions 183 5.2.2 Home-Based Approaches 1?6 5.2.3 Distributed Hash Tables 188 5.2.4 Hierarchical Approaches 191 5.3 STRUCTURED NAMING 195 5.3.1 Name Spaces 195 5.3.2 Name Resolution 198 5.3.3 The Implementation of a Name Space 202 5.3.4 Example: The Domain Name System 209 5.4 ATTRIBUTE-BASED NAMING 217 5.4.1 Directory Services 217 5.4.2 Hierarchical Implementations: LDAP 218 5.4.3 Decentralized Implementations 222 5.5 SUMMARY x CONTENTS 6 SYNCHRONIZATION 231 6.1 CLOCK SYNCHRONIZATION 232 6.1.1 Physical Clocks 233 6.1.2 Global Positioning System 236 6.1.3 Clock Synchronization Algorithms 238 6.2 LOGICAL CLOCKS 244 6.2.1 Lamport's Logical Clocks 244 6.2.2 Vector Clocks 248 6.3 MUTUAL EXCLUSION 252 6.3.1 Overview 252 6.3.2 A Centralized Algorithm 253 6.3.3 A Decentralized Algorithm 254 6.3.4 A Distributed Algorithm 255 6.3.5 A Token Ring Algorithm 258 6.3.6 A Comparison of the Four Algorithms 259 6.4 GLOBAL POSITIONING OF NODES 260 6.5 ELECTION ALGORITHMS 263 6.5.1 Traditional Election Algorithms 264 6.5.2 Elections in Wireless Environments 267 6.5.3 Elections in Large-Scale Systems 269 6.6 SUMMARY 270 7 273 - CONSISTENCY AND REPLICATION 7.1 INTRODUCTION 274 7.1.1 Reasons for Replication 274 7.1.2 Replication as Scaling Technique 275 7.2 DATA-CENTRIC CONSISTENCY MODELS 276 7.2.1 Continuous Consistency 277 7.2.2 Consistent Ordering of Operations 281 7.3 CLIENT-CENTRIC CONSISTENCY MODELS 288 7.3.1 Eventual Consistency 289 7.3.2 Monotonic Reads 291 7.3.3 Monotonic Writes 292 7.3.4 Read Your Writes 294 7.3.5 Writes Follow Reads 295

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.