Скачать презентацию Distributed Computing 1 Introduction Shmuel Zaks zaks cs Скачать презентацию Distributed Computing 1 Introduction Shmuel Zaks zaks cs

7770c343bf1c398c1a9a4734670c56fd.ppt

  • Количество слайдов: 100

© Distributed Computing 1. Introduction Shmuel Zaks zaks@cs. technion. ac. il © Distributed Computing 1. Introduction Shmuel Zaks zaks@cs. technion. ac. il

F A. Distributed Computing Introduction: model, basic problems F leader election, Spanning tree F F A. Distributed Computing Introduction: model, basic problems F leader election, Spanning tree F snapshot F synchronization F Impossibility and lower bounds F B. Self stabilization F C. ATM networks F D. Optical networks F

A. Distributed algorithms Example 1: synchony 9 8 7 6 5 4 3 2 A. Distributed algorithms Example 1: synchony 9 8 7 6 5 4 3 2 1 8 days, 1 president 4 days, 2 presidents Exercise: find a trade-off between no. of days and no. of presidents.

Example 2: leader election message passing asynchronous x 4 x 5 x 8 ? Example 2: leader election message passing asynchronous x 4 x 5 x 8 ? x 6 9 Exercise: find a better algorithm to find the maximum, prove correctness and analyze performance.

Example 3: faults Impossibility of consensus The Byzantine Generals Problem Example 3: faults Impossibility of consensus The Byzantine Generals Problem

Example 4: snapshot Example 4: snapshot

B. Self Stabilization Example 5: self stabilization shared memory synchronous 7 6 7 6 B. Self Stabilization Example 5: self stabilization shared memory synchronous 7 6 7 6 7 6

6 7 6 4 6 Exercise: find an algorithm to do it, prove correctness, 6 7 6 4 6 Exercise: find an algorithm to do it, prove correctness, analyze performance.

C. ATM networks Virtual path load = 3 hop count = 2 Virtual channel C. ATM networks Virtual path load = 3 hop count = 2 Virtual channel (space) (time) stretch factor = 4/3

Example 6: Optimal designs Given a network , find an “Optimal Layout” such that: Example 6: Optimal designs Given a network , find an “Optimal Layout” such that: (A) Given an upper bound on the hop count, minimize the load. N=7, Max hop count 1 => Min load 6

(B) Given an upper bound on the load, minimize the hop count. N=7, Max (B) Given an upper bound on the load, minimize the hop count. N=7, Max load 1 => Min hop count 6

 כדור -2ממדי ברדיוס 3: כדור -2ממדי ברדיוס 3:

 כדור -2ממדי ברדיוס 1 כדור -1ממדי ברדיוס 2: כדור -2ממדי ברדיוס 1 כדור -1ממדי ברדיוס 2:

h=1. . l = N-1 Sofsem 97 18 h=1. . l = N-1 Sofsem 97 18

h=2 Sofsem 97 19 h=2 Sofsem 97 19

h h-1 Sofsem 97 h-1 h-1 20 h h-1 Sofsem 97 h-1 h-1 20

h-1 Sofsem 97 h-1 h-1 21 h-1 Sofsem 97 h-1 h-1 21

Example 7: Decision problems Input: Graph G, a vertex v, h, l > 0. Example 7: Decision problems Input: Graph G, a vertex v, h, l > 0. Question : is there a VP layout for G, by which v can reach all ther nodes , with hop count bounded by h and load bounded by l ?

load hop 1 2 3 . . 1 P P P … 2 P load hop 1 2 3 . . 1 P P P … 2 P NP NP … 3 NP … … … . . . … …

D. Optical networks lightpaths p 1 p 2 Valid coloring D. Optical networks lightpaths p 1 p 2 Valid coloring

ADMs at the endpoints of lightpaths ADMs at the endpoints of lightpaths

Minimizing the number of ADMs w/out grooming (g = 1) W=2, ADM=8 W=3, ADM=7 Minimizing the number of ADMs w/out grooming (g = 1) W=2, ADM=8 W=3, ADM=7

g=2 w/ grooming (g > 1) W=2, ADM=8 W=1, ADM=7 g=2 w/ grooming (g > 1) W=2, ADM=8 W=1, ADM=7

w/ grooming g=2 W=3, ADM=10 W=2, ADM=8 w/ grooming g=2 W=3, ADM=10 W=2, ADM=8

A solution S is a partition of P into feasible chains and cycles Feasible A solution S is a partition of P into feasible chains and cycles Feasible 1 -colorable n x w a d b u e c v

Example 8: The MIN ADM Problem w, w/out grooming N: The # of paths. Example 8: The MIN ADM Problem w, w/out grooming N: The # of paths. ü SOL: The # of ADMs used by a solution. ü OPT: The # of ADMs used by an optimal solution. ü N SOL 2 N N OPT 2 N SOL/OPT 2 with grooming: SOL/OPT 2 g

Example 9: NP-complete? NP-Complete g=1: ring – Eilam, Moran, Z. , 2002 g>1 ring Example 9: NP-complete? NP-Complete g=1: ring – Eilam, Moran, Z. , 2002 g>1 ring – Chiu, Modiano, 2000 fixed g path, ring - Shalom, Unger, Z. , 2006 star – fixed g>3 ( poly for g=1, 2) Shalom, Flammini, Monaco, Moscardelli, Z.

n Given an instance G=(V, E) of the Edge Partition in g-regular graphs Problem, n Given an instance G=(V, E) of the Edge Partition in g-regular graphs Problem, we construct a corresponding instance of our problem on star networks: 4 1 4 3 1 0 3 2 n It is possible to show that there 2 exists a solution using at most 2|E|/g ADMs if and only if the edges of G can be partitioned in g-regular graphs.

x w a d b e c u v The Shareability Graph x a x w a d b e c u v The Shareability Graph x a x d w v x e x The Conflict Graph b a b d e u c c

x a x d w N=5 v x e x u c COST = x a x d w N=5 v x e x u c COST = 8 = OPT + 3 = = OPT + 0. 6 N b

. . . We show COST <= OPT + 0. 6 N . . . We show COST <= OPT + 0. 6 N

Problems Input: a graph and a set of paths Output: • a valid coloring Problems Input: a graph and a set of paths Output: • a valid coloring with minimum number of ADMs (number of colors can be a parameter) • a valid coloring with minimum number of ADMs, given a grooming factor (number of colors can be a parameter)

Objective function: Minimize the number of ADMs Cases: w/out grooming (g = 1) w/ Objective function: Minimize the number of ADMs Cases: w/out grooming (g = 1) w/ grooming (g > 1) Results: Complexity Approximability

Some general topologies (rings, trees) O(log n) Flammini, Moscardelli, Monaco, Shalom, Z. , 2005 Some general topologies (rings, trees) O(log n) Flammini, Moscardelli, Monaco, Shalom, Z. , 2005

A. Distributed algorithms n Distributed computing n Computer networks n Communication networks n Distributed A. Distributed algorithms n Distributed computing n Computer networks n Communication networks n Distributed algorithms n Protocols

n. PODC – ACM Symp. On Pronciples of Distributed Systems n. DISC – International n. PODC – ACM Symp. On Pronciples of Distributed Systems n. DISC – International Workshop on Distributed Computing (previously: WDAG) n. Sirocco – International Colloquium on Structural Information and Communication Complexity

References podc SIROCCO disc References podc SIROCCO disc

1. Introduction 1. 1 model 1. Introduction 1. 1 model

Communication network processors problem communication Communication network processors problem communication

Anonymous Anonymous

Unique identities a 6 c e 12 Unique identities a 6 c e 12

communication message passing a communication lines, channels b c e d topology communication message passing a communication lines, channels b c e d topology

(message passing) a b c e d directed, undirected (message passing) a b c e d directed, undirected

(message passing) Ø message delivery mechanism Ø fifo Ø reliable, no faults Ø finite, (message passing) Ø message delivery mechanism Ø fifo Ø reliable, no faults Ø finite, arbitrary delay Ø queues of messages

(message passing) Distributed algorithm, protocol Execution Ø Send a message Ø receive a message (message passing) Distributed algorithm, protocol Execution Ø Send a message Ø receive a message Ø do local computation

shared memory R 2 a b R 1 R 3 c e R 4 shared memory R 2 a b R 1 R 3 c e R 4 R 5 d

(shared memory) 7 88 40 read/write 2 9 A 31 25 B (shared memory) 7 88 40 read/write 2 9 A 31 25 B

synchronization Synchronous, Asynchronous a b c e d synchronization Synchronous, Asynchronous a b c e d

(synchronization) Synchronous Model Network i Clock j time t+d (synchronization) Synchronous Model Network i Clock j time t+d

(synchronization) Asynchronous Model Network i Clock j time t+? ? ? (synchronization) Asynchronous Model Network i Clock j time t+? ? ?

(synchronization) Synchronous Model unique execution rounds Asynchronous Model many executions (synchronization) Synchronous Model unique execution rounds Asynchronous Model many executions

(synchronization) Synchronous Asynchronous Shared memory Message passing (synchronization) Synchronous Asynchronous Shared memory Message passing

Asynchronous model: for correctness, for upper bound analysis Synchronous model: for lower bound analysis Asynchronous model: for correctness, for upper bound analysis Synchronous model: for lower bound analysis

Topology Ring a b c e d Topology Ring a b c e d

(Topology) Clique a b c e d (Topology) Clique a b c e d

(Topology) General 12 7 88 40 2 9 31 25 4 (Topology) General 12 7 88 40 2 9 31 25 4

(Topology) Why simple networks? n They enable the understanding of many design issues n (Topology) Why simple networks? n They enable the understanding of many design issues n In existing general networks – assume a virtual simple network implemented (e. g. a ring)

Complexity measures Ø Synchronous system v time v communication Ø Asynchronous system v communication Complexity measures Ø Synchronous system v time v communication Ø Asynchronous system v communication (messages, bits) v time (synchronous time, longest chain, bounded delay)

Sense of direction, topological awareness Ø global information v number of processors v topology Sense of direction, topological awareness Ø global information v number of processors v topology of the network Ø local information v knowledge of ‘left’ and ‘right’ in a ring network v knowledge of neighbour’s identities

General references Ø lower level protocols Ø general books General references Ø lower level protocols Ø general books

Parallel vs. Distributed computing Parallel computing – given a problem … (ex: sorting) Distributed Parallel vs. Distributed computing Parallel computing – given a problem … (ex: sorting) Distributed computing – Given a network … (ex: broadcast)

(Parallel vs. Distributed computing) Complexity goals: Parallel computing : time vs. number of processors (Parallel vs. Distributed computing) Complexity goals: Parallel computing : time vs. number of processors Distributed computing: number of messages Parallel computing: efficiency Distributed computing: correctness

Partially Synchronous Models Many different models Ø bounded delay networks Ø non accurate clocks Partially Synchronous Models Many different models Ø bounded delay networks Ø non accurate clocks Ø eventually synchronous Ø some communication links good Ø failure detectors

problem, task 1 3 yes 1 0 7 no 1 P 2 P 3 problem, task 1 3 yes 1 0 7 no 1 P 2 P 3 consensus Leader election 5 0 no 1 input output

issues Ø design and analysis of algorithms Ø impossibility, lower bounds Ø fault tolerance issues Ø design and analysis of algorithms Ø impossibility, lower bounds Ø fault tolerance

1. Introduction 1. 2 basic problems 1. Introduction 1. 2 basic problems

problems Ø broadcast Ø leader election, breaking symmetry, maximum finding, spanning tree, center Ø problems Ø broadcast Ø leader election, breaking symmetry, maximum finding, spanning tree, center Ø shortest path, maximal flow Ø consensus Ø snapshot Ø termination Ø deadlock

Example: broadcast a f b c e d Example: broadcast a f b c e d

Broadcast: bfs (breadth-first-search) a f b c e d Broadcast: bfs (breadth-first-search) a f b c e d

Broadcast: dfs (depth-first-search) a f b c e d Broadcast: dfs (depth-first-search) a f b c e d

complexity Ø message complexity 2|E| Ø time complexity 2|E|-1 complexity Ø message complexity 2|E| Ø time complexity 2|E|-1

broadcast: pi (propogation of information) a f b c e d broadcast: pi (propogation of information) a f b c e d

pi algorithm send m to each neighbour stop if receive m along edge e: pi algorithm send m to each neighbour stop if receive m along edge e: send m on all edges except e stop

pi Theorem: The following holds for every execution of the pi algorithm: n A pi Theorem: The following holds for every execution of the pi algorithm: n A processor receives the message m at most once. n The execution terminates. n each processor receives the message m. n The edges on which processors receive m form a spanning tree. n The message complexity is 2|E|-|V|+1. n The time complexity …

pif (propogation of information shout-echo a with feedback) f b c e d pif (propogation of information shout-echo a with feedback) f b c e d

References References

References H. Attiya and J. Welch, Distributed Computing, 1995 References H. Attiya and J. Welch, Distributed Computing, 1995

References B. Awerbuch, A new distributed depth first search, 1985 References B. Awerbuch, A new distributed depth first search, 1985

References D. P. Bertsekas and R. Gallager, Data Networks, 1992 References D. P. Bertsekas and R. Gallager, Data Networks, 1992

References J. E. Burns, A formal model for message passing systems, TR-91, Indiana University, References J. E. Burns, A formal model for message passing systems, TR-91, Indiana University, September 1980.

References E. Chang, Decentralized algorithms in distributed systems, TR CSRG-103, Department of Computer Science, References E. Chang, Decentralized algorithms in distributed systems, TR CSRG-103, Department of Computer Science, University of Toronto, October 1979.

References I. Cidon, Yet another distributed depth first search algorithm, 1993 References I. Cidon, Yet another distributed depth first search algorithm, 1993

References N. Lynch, Distributed Computing, 1992 References N. Lynch, Distributed Computing, 1992

References N. Santoro, Sense of direction, topological awareness and communication complexity, SIGACT News, 16, References N. Santoro, Sense of direction, topological awareness and communication complexity, SIGACT News, 16, 2, Summer 1984, pp. 50 -56.

References A. Segall, Distributed network protocols, IEEE Trans. on Information Theory, 29 (1), January References A. Segall, Distributed network protocols, IEEE Trans. on Information Theory, 29 (1), January 1983, pp. 23 -35.

References A. S. Tanenbaum, Computer Networks, 1988 References A. S. Tanenbaum, Computer Networks, 1988

References G. Tel, Introduction to Distributed Computing, 1992 References G. Tel, Introduction to Distributed Computing, 1992

21 st PODC, June 2002, Monterey, California n Yehuda Lindell, Anna Lysyanskaya, Tal Rabin 21 st PODC, June 2002, Monterey, California n Yehuda Lindell, Anna Lysyanskaya, Tal Rabin Sequential Composition of Protocols without Simultaneous Termination n Tomasz Jurdzinski, Miroslaw Kutylowski, Jan Zatopianski n Efficient algorithms for leader election in radio networks n Subhendu Chattopadhyay, Lisa Higham, Karen Seyffarth n Dynamic and Self-Stabilizing Distributed Matching

Matthias Fitzi, Daniel Gottesman, Martin Hirt, Thomas Holenstein, and Adam Smith Byzantine Agreement Secure Matthias Fitzi, Daniel Gottesman, Martin Hirt, Thomas Holenstein, and Adam Smith Byzantine Agreement Secure Against Faulty Majorities From Scratch Kazuo Iwama and Masaki Okita Compact Routing for Average-Case Networks

22 nd PODC, June 2003, Boston, Massachusetts Amitanand Aiyer, Sanketh Indarapu, Srinathan Kannan, Vinod 22 nd PODC, June 2003, Boston, Massachusetts Amitanand Aiyer, Sanketh Indarapu, Srinathan Kannan, Vinod Vaikuntanathan, C. Pandu Rangan Distributed Consensus in the presence of Sectional Faults Marta Arias, Lenore Cowen, A. Kofi Laing, Compact Roundtrip Routing with Topology-Independent Node Names Matthias Fitzi, Juan Garay Efficient Player-Optimal Protocols for Strong and Differential Consensus

16 th DISC, October 2002, Toulouse, France Roy Friedman, Achour Mostéfaoui, Sergio Rajsbaum and 16 th DISC, October 2002, Toulouse, France Roy Friedman, Achour Mostéfaoui, Sergio Rajsbaum and Michel Raynal Distributed Agreement and its Relation with Error. Correcting Codes Kleoni Ioannidou Transformations of Self-Stabilizing Algorithms Gideon Stupp Stateless Termination Detection Yon Dourisboure and Cyril Gavoille Improved Compact Routing Scheme for Chordal Graphs

17 th DISC, October 2003, Sorrento, Italy Marcos Aguilera, Burkhard Englert, Eli Gafni Uniform 17 th DISC, October 2003, Sorrento, Italy Marcos Aguilera, Burkhard Englert, Eli Gafni Uniform Solvability with a Finite Number of MWMR Registers Partha Dutta, Rachid Guerraoui, Bastian Pochon Tight Lower Bounds on Early Local Decisions in Uniform Consensus Kazuo Iwama, Masaki Okita Compact Routing for Flat Networks Victor Luchangco, Mark Moir, Nir Shavit On the Uncontended Complexity of Consensus

6 th Sirocco, June 1999, Ocean, France Lacanau- A Bui, A. K. Datta, F. 6 th Sirocco, June 1999, Ocean, France Lacanau- A Bui, A. K. Datta, F. Petit and V. Villain, Snap-stabilizing PIF algorithm in trees S. Dobrev, Leader election using any sense of direction 7 th Sirocco, June 2000, L’Aquila, Italy Paolo Boldi and Sebastiano Vigna, Lower bounds for weak sense of direction