1 / 21

Università degli Studi dell’Aquila Academic Year 20 11 /20 12

Università degli Studi dell’Aquila Academic Year 20 11 /20 12. Course : Algorithms for Distributed Systems Instructor : Prof. Guido Proietti. Time : Monday: 11.45 – 13.15 – Room 2.4 Wednesday: 11.45 – 13.15 – Room 2.4 Questions? : Wednesday 16.30-17.30.

gannon
Download Presentation

Università degli Studi dell’Aquila Academic Year 20 11 /20 12

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Università degli Studi dell’Aquila Academic Year 2011/2012 Course: Algorithms for Distributed Systems Instructor: Prof. Guido Proietti Time: Monday: 11.45 – 13.15 – Room 2.4 Wednesday: 11.45 – 13.15 – Room 2.4 Questions?: Wednesday 16.30-17.30 Slides plus other infos: http://www.di.univaq.it/~proietti/didattica.html

  2. Two main ingredients in the course:Distributed Systems + Algorithms • Distributed system (DS): Broadly speaking, we refer to a set of autonomous computational devices (say, processors) performing multiple operations/tasks simultaneously, and which influence reciprocally either by taking actions or by exchanging messages (using an underlying communication infrastructure) • We will be concerned with the computational aspects of a DS. We will analyze a DS depending on the cooperativeness level of its processors: • Obedient: always cooperate honestly with the system  Classic field of distributed computing • Adversarial: may operate against the system  Fields of fault-tolerance and security in DS • Rational: selfishly choose how to behave  Emerging field of game-theoretic aspects of DS

  3. Two main ingredients in the course:Distributed Systems + Algorithms • Algorithm (informal definition): effective method, expressed as a finite list of well-defined instructions, for solving a given problem (e.g., calculating a function, implementing a goal, reaching a benefit, etc.) • Regardless of their nature, processors in a DS follow a strategy which is dictated by an algorithm! • We will analyze these algorithms in (almost) every respect: existence, correctness, finiteness, efficiency (computational complexity), effectiveness, robustness, stability (w.r.t. to a given solution concept), etc.

  4. Modern Distributed Applications • In the old days: a number of workstations over a LAN • Today • Collaborative computing • Military command and control • Online strategy games • Massive computation • Distributed Real-time Systems • Process Control • Navigation systems, Airline Traffic Monitoring (ATM) Mobile Ad hoc Networks Rescue Operations, emergency operations, robotics Wireless Sensor Networks Habitat monitoring, intelligent farming Grid and Cloud computing Stock market …

  5. The mother of all DS: the Internet

  6. Some Issues in Building Distributed Applications • Reliability (connectivity) • Security (cryptography) • Consistency (mutual exclusion) • Cooperativeness (game theory) • Fault-tolerance (failures, recoveries…) • Performance: What is the efficiencyof the designed algorithm? • Scalability: How is the performance affected as the number of processors increase ?

  7. Course structure • FIRST PART: Algorithms for COOPERATIVE DS • Leader Election • Minimum spanning tree • Maximal independent set • SECOND PART: Algorithms for UNRELIABLE DS • Benign failures: consensus problem • Byzantine failures: consensus problem • THIRD PART: Algorithms for CONCURRENT DS • Mutual exclusion • Mid-term Written Examination:Last week of November • FOURTH PART: DS SECURITY • Elements of cryptography • FIFTH PART: Algorithms for STRATEGIC DS • Strategic equilibria theory • Algorithmic mechanism design (AMD) • AMD for Graph optimization problems • SIXTH PART (???): Algorithms for WIRELESS DS • Final Oral Examination: depending of the mid-term rate

  8. Cooperative distributed algorithms: Message Passing System A Formal Model

  9. The System • Topology: a network (connected undirected graph) • Processors (nodes) • Communication channels (edges) • Degree of synchrony: asynchronous versus synchronous (universal clock) • Degree of symmetry: anonymous (processors are indistinguishable) versus non-anonymous • Degree of Uniformity: uniform (number of processors is unknown) versus non-uniform Local algorithm: the algorithm associated with each single processor Distributed algorithm: the “composition” of local algorithms

  10. Notation • n processors: p0, p1, … , pn-1. • Each processor knows nothing about the network topology, except for its neighbors, numbered from from 1 to r • Communication takes place only through message exchanges, using buffers associated with each neighbor, namely outbufi[k], inbufi[k], i=1,…,r. • qi: the state set for pi, containing a distinguished initial state; each state describes the internal status of the processor and the status of the buffers

  11. Configuration and events • System configuration: A vector [q0,q1,…,qn-1] where qi is the state of pi • Events: Computation events (internal computations plus sending of messages), and message delivering events

  12. Execution C01 C1 2 C2 3 … where • Ci : A configuration • i : An event • C0 : An initial configuration

  13. Asynchronous Systems • No upper bound on delivering times • Admissible execution: each message sent is eventually delivered

  14. Synchronous Systems • Each processor has a (common) clock, and computation takes place in rounds. • At each round each processor: • Reads the incoming messages buffer • Makes some internal computations • Sends messages which will be read in the next round.

  15. Message Complexity • The total number of messages sent during any admissible execution of the algorithm (in other words, the number of message delivery events). • However, the size of a message will count as well…

  16. Time Complexity • Synchronous: The number of rounds until termination. • Asynchronous: not really meaningful

  17. Example:Distributed Depth-First Search visit of a graph • Visiting a graph G=(V,E) means to explore all the nodes and edges of the graph • General overview of a sequential algorithm: • Begin at some source vertex, r0 • when reaching any vertex v • if v has an unvisited neighbor, then visit it and proceed further from it • otherwise, return to parent(v) • when we reach the parent of some vertex v such that parent(v) = NULL, then we terminate since v = r0 • DFS defines a tree, with r0 as the root, which reaches all vertices in the graph • sequential time complexity = O(|E|+|V|)

  18. DFS: an example (1/2)

  19. DFS: an example (2/2)

  20. Distributed DFS (cont’d.) • Distributed version (token-based): the token traverses the graph in a depth-first manner using the algorithm described above • Start exploration (visit) at a waking-up node (root) r. • When v is visited for the first time: 2.1 Inform all of its neighbors that it has been visited. 2.2 Wait for acknowledgment from all neighbors. 2.3 Resume the DFS process. 2.4 If no unvisited neighbor node exists, then pass token back to the parent node • Message complexity is Θ(|E|) (optimal, because of the trivial lower bound of (|E|) induced by the fact that every node must know the status of each of its neighbors – this requires an atomic message for each graph edge)

  21. Distributed DFS (cont’d.) • Time complexity analysis (sync. DS) We ensure that vertices visited for the first time know which of their neighbors have been visited; thus we make no unnecessary vertex explorations: • algorithm: freeze the DFS process; inform all neighbors of v that v has been visited; get Ack messages from those neighbors; restart DFS process  constant number of rounds (i.e., 2) for each new discovered node • only O(|V|) nodes are discovered  time complexity = O(|V|)

More Related