# Distributed Computing 1. Introduction Shmuel Zaks ©

## Presentation on theme: "Distributed Computing 1. Introduction Shmuel Zaks ©"— Presentation transcript:

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

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

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

message passing asynchronous 9 4 5 8 6 Example 2: leader election ? x x x x 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 4: snapshot

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

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

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

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 Example 6: Optimal designs

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

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

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

Sofsem97 18 h=1 l = N-1...

Sofsem97 19 h=2

Sofsem97 20 h h-1

Sofsem97 21 h-1

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 ? Example 7: Decision problems

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

lightpaths p1 p2 Valid coloring D. Optical networks

ADMs at the endpoints of lightpaths

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

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

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

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

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

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. Example 9: NP-complete?

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: It is possible to show that that there 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. 0 1 2 1 2 4 3 3 4

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

a b c de w v x x u x x N = 5 COST = 8 = OPT + 3 = = OPT + 0.6 N

We show COST <= OPT + 0.6 N...

Input: a graph and a set of paths Output: a valid coloring 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) Problems

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

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

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

References podc disc SIROCCO

1. Introduction 1.1 model

processors communication problem Communication network

Anonymous

12 a e 6 c Unique identities

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

ab c d e directed, undirected (message passing)

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

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

R4R4 R1R1 R2R2 R3R3 R5R5 e a b d c shared memory

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

synchronization Synchronous, Asynchronous d a e b c

Synchronous Model ij time t+dtime t Clock Network (synchronization)

Asynchronous Model ij time t+???time t Clock Network (synchronization)

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

Asynchronou s Synchronous Shared memory Message passing (synchronization)

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

Topology Ring d a e b c

Clique d a e b c (Topology)

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

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

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

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

General references  lower level protocols  general books

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

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

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

problem, task P1P1 P2P2 P3P3 input output 3 7 5 Leader election yes no consensus 1 0 0 1 1 1

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

1. Introduction 1.2 basic problems

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

Example: broadcast d a e b c f

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

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

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

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

send m to each neighbour stop pi algorithm 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: A processor receives the message m at most once. The execution terminates. each processor receives the message m. The edges on which processors receive m form a spanning tree. The message complexity is 2|E|-|V|+1. The time complexity …

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

References

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

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

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, September 1980.

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 N. Lynch, Distributed Computing, 1992

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 1983, pp. 23-35.

References A. S. Tanenbaum, Computer Networks, 1988

References G. Tel, Introduction to Distributed Computing, 1992

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

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 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 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 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, Lacanau- Ocean, France 7 th Sirocco,June 2000, L’Aquila, Italy Paolo Boldi and Sebastiano Vigna, Lower bounds for weak sense of direction 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
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://slideplayer.com/slide/4047869/", "fetch_time": 1524260511000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2018-17/segments/1524125944682.35/warc/CC-MAIN-20180420194306-20180420214306-00460.warc.gz", "warc_record_offset": 308895557, "warc_record_length": 26724, "token_count": 2933, "char_count": 10590, "score": 3.578125, "int_score": 4, "crawl": "CC-MAIN-2018-17", "snapshot_type": "latest", "language": "en", "language_score": 0.6950332522392273, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00035-of-00064.parquet"}