ebook img

Principles of Distributed Systems PDF

266 Pages·1996·7.512 MB·English
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 Principles of Distributed Systems

PRINCIPLES OF DISTRIBUTED SYSTEMS PRINCIPLES OF DISTRIBUTED SYSTEMS Vijay K. Garg Department of Electrical and Computer Engineering University of Texas at Austin Austin, 1)( 78712-1084 KLUWER ACADEMIC PUBLISHERS BostonILondonIDordrecht Distributors for North America: Kluwer Academic Publishers 101 Philip Drive Assinippi Park Norwell, Massachusetts 02061 USA Distributors for all other countries: Kluwer Academic Publishers Group Distribution Centre Post Office Box 322 3300 AH Dordrecht, THE NETHERLANDS Library of Congress Cataloging-in-Publication Data A C.I.P. Catalogue record for this book is available from the Library of Congress. ISBN-13: 978-1-4612-8567-0 e-ISBN-13: 978-1-4613-1321-2 001: 10.1007/978-1-4613-1321-2 Copyright @ 1996 by Kluwer Academic Publishers Softcover reprint of the hardcover 1s t edition 1996 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher, Kluwer Academic Publishers, 101 Philip Drive, Assinippi Park, Norwell, Massachusetts 02061 Printed on acid-free paper. Dedicated to my parents Saran Lal and Laxmi Devi Garg, and my wife Meenakshi Garg. CONTENTS LIST OF FIGURES xi PREFACE xv INTRODUCTION TO DISTRmUTED SYSTEMS Introduction 1 Distributed Systems versus Parallel Systems 2 Partial Orders 3 Notation 6 Overview of the book 7 Exercises 8 Bibliographic Remarks 9 1 TIME 1.1 Introduction 11 1.2 Model of a distributed system 12 1.3 Logical Clocks 15 1.4 Vector Clocks 20 1.5 Direct Dependency Clocks 33 1.6 Higher Dimensional Clocks 37 1.7 Exercises 44 1.8 Bibliographic Remarks 46 2 MUTUAL EXCLUSION 2.1 Introduction 49 2.2 Problem 50 2.3 Lamport's Algorithm 52 vii viii PRINCIPLES OF DISTRIBUTED SYSTEMS 2.4 Ricart and Agrawala's Algorithm 60 2.5 Centralized Algorithm 65 2.6 Dijkstra's Self-stabilizing Algorithm 67 2.7 Exercises 69 2.8 Bibliographic Remarks 69 3 GLOBAL STATE 3.1 Introduction 71 3.2 Consistent Cuts 73 3.3 Global Snapshots of Processes 75 3.4 Global Snapshots of Processes and Channels 77 3.5 Global Snapshots for non-FIFO channels 79 3.6 Applications of Global Snapshot Algorithms 79 3.7 Exercises 82 3.8 Bibliographic Remarks 84 4 POSSmLE GLOBAL PREDICATES 4.1 Introduction 85 4.2 Possibility of a Global Predicate 86 4.3 NP-Completeness of Global Predicate Detection 87 4.4 Linear Predicates 88 4.5 Semi-Linear Predicates 93 4.6 Exercises 94 4.7 Bibliographic Remarks 95 5 CONJUNCTIVE POSSmLE GLOBAL PREDICATES 5.1 Introduction 97 5.2 Weak Conjunctive Predicates 98 5.3 A Vector Clock based Centralized Algorithm for WCP 99 5.4 A Direct Dependence based Centralized Algorithm for WCP 108 5.5 A Vector Clock based Distributed Algorithm for WCP 111 5.6 A Centralized Algorithm for Generalized Conjunctive Predicates 115 5.7 A Vector Clock based Distributed GCP Detection Algorithm 127 5.8 Exercises 134 5.9 Bibliographic Remarks 136 Contents ix 6 RELATIONAL POSSmLE GLOBAL PREDICATES 6.1 Introduction 137 6.2 Relational Predicate with Two Integer Variables 138 6.3 Relational predicates with N Boolean Variables 148 6.4 Bounded Sum Predicates 161 6.5 Exercises 164 6.6 Bibliographic Remarks 164 7 INEVITABLE GLOBAL PREDICATES 7.1 Introduction 165 7.2 Global Sequence 166 7.3 Logic for Global Predicates 168 7.4 Strong Conjunctive Predicates 169 7.5 Algorithms for Detecting SCP 175 7.6 Exercises 176 7.7 Bibliographic Remarks 177 8 CONTROL FLOW PREDICATES 8.1 Introduction 179 8.2 LRDAGLogic 180 8.3 Examples 182 8.4 Decentralized Detection Algorithm 187 8.5 Exercises 189 8.6 Bibliographic Remarks 190 9 ORDER 9.1 Introduction 191 9.2 Relationship among Message Orderings 193 9.3 FIFO Ordering of Messages 195 9.4 Causal Ordering Of Messages 197 9.5 Synchronous Ordering of Messages 199 9.6 Exercises 211 9.7 Bibliographic Remarks 212 10 COMPUTATION 10.1 Introduction 213 x PRINCIPLES OF DISTRIBUTED SYSTEMS 10.2 Global Functions 214 10.3 Repeated Computation 219 10.4 Exercises 245 10.5 Bibliographic Remarks 246 REFERENCES 247 INDEX 253 LIST OF FIGURES Introduction Hasse Diagram 4 Chapter 1 1.1 An example of a run 13 1.2 Illustration of a clock assignment 17 1.3 Vector Clock Algorithm VCl 21 1.4 Vector Clock Algorithm VC2 23 1.5 A sample execution of the vector clock algorithm VC2 23 1.6 Examples ofrelations on states 24 1.7 A sample execution of the direct dependency clock algorithm. 34 1.8 State intervals 39 1.9 Demonstration of the pred function 40 1.10 Matrix Clock Algorithm 40 1.11 Matrix clock example. 41 1.12 Computing pred.(pred.(k, n ).i).j 43 1.13 Discarding obsolete information 44 Chapter 2 2.1 Problem with the simple centralized mutual exclusion algorithm 51 2.2 The Algorithm for Active Vector at process i 53 2.3 Proof for the induction case 55 2.4 Lamport's Algorithm for Mutual Exclusion 55 2.5 Ricart and Agrawala's Algorithm 61 2.6 Proof for the Ricart and Agrawala's Algorithm 63 2.7 Algorithm for Client Processes 65 2.8 Algorithm for the coordinator process 66 xi xii PRINCIPLES OF DISTRIBUTED SYSTEMS Chapter 3 3.1 Consistent and inconsistent cuts 72 3.2 Snapshot algorithm for recording local states 75 3.3 Chandy and Lamport's Snapshot Algorithm 78 3.4 Prooffor Safety 78 3.5 An Algorithm for Snapshots when channels are non-FIFO. 80 Chapter 4 4.1 Example of a Non-Linear Predicate 91 4.2 An efficient algorithm to detect a linear predicate 91 Chapter 5 5.1 checker and application processes for WCP detection. 100 5.2 WCP Detection Algorithm - Application Process 101 5.3 WCP Detection Algorithm - Checker Process. 103 5.4 Procedure paint-state. 104 5.5 The algorithm for the adversary 108 5.6 Checker Process Algorithm 110 5.7 Monitor Process Algorithm 113 5.8 The set of cuts satisfying the channel predicate is not a lattice. 117 5.9 Application process algorithm for Pi 118 5.10 GCP Detection Algorithm, Checker Process 119 5.11 Procedure update-channels 122 5.12 Monitor Process for GCP Algorithm 129 5.13 Update channels 130 5.14 Evaluating Channel Predicates 131 5.15 On Receiving an Update Message 132 5.16 Procedure to Send the Token 132 Chapter 6 6.1 Relationship among intervals when KEY is in Po. 139 6.2 The function check for centralized detection of a relational predicate. 145 6.3 Function that determines if an antichain of size K exists. 150 6.4 An example of a failed naive strategy. 152 6.5 Generalized Merge Procedure for deposets 155

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.