Download
introduction to distributed algorithm part one protocols chapter 2 the model n.
Skip this Video
Loading SlideShow in 5 Seconds..
Introduction to Distributed Algorithm Part One: Protocols Chapter 2- The Model PowerPoint Presentation
Download Presentation
Introduction to Distributed Algorithm Part One: Protocols Chapter 2- The Model

Introduction to Distributed Algorithm Part One: Protocols Chapter 2- The Model

0 Views Download Presentation
Download Presentation

Introduction to Distributed Algorithm Part One: Protocols Chapter 2- The Model

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Introduction to Distributed AlgorithmPart One: ProtocolsChapter 2- The Model Teacher: Chun-Yuan Lin The Model

  2. The Model (1) • Several different models of distributed information processing are used frequently in the study of distributed algorithms. • The choice of a particular model usually depends on what problem from the area of distributed computing is studied and what type of algorithm or impossibility proof is presented. • The model must describe precisely and concisely the relevant aspects of a class of computing systems. The Model

  3. The Model (2) • A distributed computation is usually considered as a collection of discrete events, each event being an atomic change in the configuration (the state of the entire system). • In Section 2.1 this notion is captured in the definition of transition systems. • Sections 2.2 and 2.3 consider consequences and properties of the model described in Section 2.1. • Further assumptions and notation not incorporated in the basic model will be discussed in Section 2.4. The Model

  4. Transition Systems and Algorithms (1) • A system whose state changes in discrete steps (transitions or events) can usually be conveniently described by the notion of a transition system. • Transition systems are an important concept in the study of distributed algorithms. • In distributed systems transitions influence only part of the configuration (the system's global state). • The components of the configuration include the state of each individual process. • Processes in a distributed system communicate either by accessing shared variablesor by message passing. We shall take a more restrictive point of view and consider only distributed systems where processes communicate by exchanging messages. The Model

  5. Transition Systems and Algorithms (2) • Messages in distributed systems can be passed either synchronouslyor asynchronously. The main emphasis in this book is on algorithms for systems where messages are passed asynchronously. The Model

  6. Transition Systems (1) • A transition system consists of the set of all possible states of the system, the transitions ("moves") the system can make in this set, and a subset of states in which the system is allowed to start. The Model

  7. Transition Systems (2) The Model

  8. Systems with Asynchronous Message Passing (1) • A distributed system consists of a collection of processesand a communication subsystem. Each process is a transition system in itself, with the annotation that it can interact with the communication subsystem. • The terms “transition” and “configuration” are used for attributes of the entire system and the (otherwise equivalent) terms "event" and "state" are used for attriblltes of processes. • To interact with the communication system a process has not only ordinary events (referred to as internal events) but also sendeventsand receive events. The Model

  9. Systems with Asynchronous Message Passing (2) The Model

  10. Systems with Asynchronous Message Passing (3) • To describe the coordination, we shall define a distributed system as a transition system where the configuration set, transition relation, and initial states are constructed from the corresponding components of the processes. • A configuration consists of the state of each process and the collection of messages in transit; the transitions are the events of the processes; the initial configurations are the configurations where each process is in an initial state and the message collection is empty. The Model

  11. Systems with Asynchronous Message Passing (4) The Model

  12. Systems with Asynchronous Message Passing (5) The Model

  13. Systems with Synchronous Message Passing (1) • Message passing is said to be synchronousif a send event and the corresponding receive event are coordinated to form a single transition of the system. • Consequently, the transitions of the system are of two types: one corresponding to the internal state changes of a process, the other corresponding to the combined communication events of two processes. The Model

  14. Systems with Synchronous Message Passing (2) The Model

  15. Synchronism and its impact on algorithms (1) • It has already been re­marked that for many purposes synchronous message passing can be regarded as a special case of asynchronous message passing. • The collection of executions is restricted in the case of synchronous message passing to those executions where each send event is followed immediately by the corresponding receive event. • In the asynchronous case, each process may first send a message and subsequently receive the message from the other process. The messages are temporarily· buffered in the communication subsystem. The Model

  16. Synchronism and its impact on algorithms (2) • In the synchronous case, no such buffering is possible. • An exchange of two messages can take place in a synchronous system only if one of the following two conditions is satisfied. • It is determined in advance which of the two processes will send first, and which one will receive first. • The processes have the non-deterministic choice either to send first and receive next, or to receive first and send next. The Model

  17. Fairness • In some cases it is necessary to restrict the behavior of the system to so­called fairexecutions. • Most of the algorithms treated in this book do not rely on these conditions. The Model

  18. Proving Properties of Transition Systems (1) • Given a distributed algorithm for some problem, it is necessary to demonstrate that the algorithm is a correct solution to this problem. These methods rely only on the definition of transition systems. • Many of the required properties of distributed algorithms fall into one of two types: safety requirementsand liveness requirements. • A safety requirement imposes that a certain property must hold for each execution of the system in everyconfiguration reached in that execution. • A liveness requirement imposes that a certain property must hold for each execution of the system in someconfiguration reached in that execution. The Model

  19. Proving Properties of Transition Systems (2) • The verification methods described in this section are based on the truth of assertionsin the configurations reached in an execution. • An assertion is a unary relation on the set of configurations, that is, a predicate that is true for a subset of the configurations and false for others. The Model

  20. Safety Properties (1) • A safety property of an algorithm is a property of the form “Assertion P is true in each configuration of each execution of the algorithm”. Informally this is formulated as “Assertion P is always true”. • The basic technique for showing that assertion P is always true is to demonstrate that P is an invariant according to the definitions that are to follow. The Model

  21. Safety Properties (2) The Model

  22. Safety Properties (3) The Model

  23. Liveness Properties (1) • A liveness property of an algorithm is a property of the form “Assertion P is true in some configuration of each execution of the algorithm”. Informally this is formulated as “Assertion P is eventually true”. • The basic techniques used to show that P is eventually true are norm functionsand deadlock-freenessor proper termination. • Let S be a transition system and Pa predicate. Define term as the predicate that is true in all terminal configurations and false in all non-terminal configurations. The Model

  24. Liveness Properties (2) The Model

  25. Causal Order of Events and Logical Clocks (1) • The view on executions as sequences of transitions naturally induces a notion of time in executions. A transition a is then said to occur earlier than transition b if a occurs in the sequence before b. The Model

  26. Causal Order of Events and Logical Clocks (2) The Model

  27. Independence and Dependence of Events (1) The Model

  28. Equivalence of Executions: Computations (1) • In this subsection it is shown that the events of an execution can be reordered in any order consistent with the causal order, without affecting the result of the execution. The Model

  29. Equivalence of Executions: Computations (2) The Model

  30. Synchronous message passing (1) The Model

  31. Logical Clocks (1) • In the remainder of this section some examples of clocks are discussed. The Model

  32. Logical Clocks (2) The Model

  33. Logical Clocks (3) The Model

  34. Additional Assumptions, Complexity-The Network Topology (1) • If a process p can send messages to process q, a channel is said to exist from p to q. Unless stated otherwise it is assumed that channels are bidirectional, that is, the same channel allows q to send messages to p. • A channel that accommodates only one-way traffic from p to q is called a unidirectional(or directed) channel from p to q. • The collection of processes and the communication subsystem is also referred to as a network. • The graph of a distributed system is also called its network topology. The Model

  35. Additional Assumptions, Complexity-The Network Topology (2) The Model

  36. Additional Assumptions, Complexity-The Network Topology (3) • The topology can be staticor dynamic. A static topology means that the topology remains fixed during the distributed computation. A dynamic topology means that channels (sometimes even processes) can be added or removed from the system during the computation. The Model

  37. Properties of the Channels (1) • Next some commonly made assumptions about the correspondence between send and receive events are discussed. • Reliability • A channel is said to be reliablewhen every message that is sent in the channel is received exactly once. • Unless stated otherwise, it is always assumed in this book that the channels are reliable. • A channel that is not reliable may exhibit communication failures, which can be of several types, e.g., loss, garble, duplication, creation. • The lossof a message occurs when the message is sent, but never received; it can be modeled by a transition that removes the message from M. The Model

  38. Properties of the Channels (2) • The garblingof a message occurs when the message received is different from the message sent; it can be modeled by a transition that changes one message of M. • The duplication of a message occurs when the message is received more often than it is sent; it is modeled by a transition that copies a message of M. • The creationof a message occurs when a message is received that has never been sent; it is modeled by a transition that inserts a message in M. • The fifo property • Unless stated otherwise, fifo channels will notbe assumed in this book. • Fifo channels can be represented in the model of Definition 2.6 by replacing the collection M by a set of queues, one for each channel. The Model

  39. Properties of the Channels (3) • Channel capacity • The capacityis the number of messages that can be in transit in the channel at the same time. • In this book it will always be assumed that the capacity of the channels is unbounded. The Model

  40. Real-time Assumptions • Real-time clocks can be incorporated by equipping each process with a real-time clock variable. • Real-tilne assumptions are not made in this book; that is, we consider fully asynchronoussystems and algorithms. The Model

  41. Process Knowledge (1) • Examples of such knowledge include the following information. • Topological information • Information about the topology includes: the number of processes, the diameter of the network graph, and the topology of the graph. • Process identity • In many algorithms it is required that the processes have unique names (identities), and that each process knows its own name initially. • In this book it will always be assumed that processes do have access to their identity; in this case the system is referred to as a named network. The Model

  42. Process Knowledge (2) • Neighbor identities • If processes are distinguished by a unique name, it is possible to assume that each process knows initially the names of its neighbors. This assumption is referred to as neighbor kno1wledgeand, unless stated otherwise, will not be made. • direct addressing and indirect addressing The Model

  43. The Complexity of Distributed Algorithms (1) • The resource consumption of distributed algorithms can be measured in several ways. • Message complexity • This is the total number of messages exchanged by the algorithm. • Bit complexity • As “long” messages are more expensive to transmit than “short” messages, one may also count the total number of bits contained in messages. • In most cases only the message complexity of algorithms will be analyzed. The Model

  44. The Complexity of Distributed Algorithms (2) • Time complexity • The definition used in this book is based on an idealized timing of the events of a computation according to the following assumptions. • The time for processing an event is zero time units. • The transmission time (i.e., the time between sending and receiving a message) is at most one time unit. • Space complexity • The space complexity of an algorithm equals the amount of memory needed in a process to execute it. • Worst-case and average-case complexity is made. The Model