From Shared Memory to Message Passing

Similar documents
Foundations of Distributed Systems: Tree Algorithms

Near-Optimal Radio Use For Wireless Network Synch. Synchronization

Optimal Clock Synchronization in Networks. Christoph Lenzen Philipp Sommer Roger Wattenhofer

Radio Aggregation Scheduling

Sensor Networks. Distributed Algorithms. Reloaded or Revolutions? Roger Wattenhofer

Clock Synchronization

Data Gathering. Chapter 4. Ad Hoc and Sensor Networks Roger Wattenhofer 4/1

Low-Latency Multi-Source Broadcast in Radio Networks

MAC Theory Chapter 7. Standby Energy [digitalstrom.org] Rating. Overview. No apps Mission critical

MAC Theory. Chapter 7

Achieving Network Consistency. Octav Chipara

Monitoring Churn in Wireless Networks

Design of an energy efficient Medium Access Control protocol for wireless sensor networks. Thesis Committee

ENGI 128 INTRODUCTION TO ENGINEERING SYSTEMS

Link State Routing. Brad Karp UCL Computer Science. CS 3035/GZ01 3 rd December 2013

Selective Families, Superimposed Codes and Broadcasting on Unknown Radio Networks. Andrea E.F. Clementi Angelo Monti Riccardo Silvestri

Coding for Efficiency

M U LT I C A S T C O M M U N I C AT I O N S. Tarik Cicic

Robust Location Detection in Emergency Sensor Networks. Goals

Rumors Across Radio, Wireless, and Telephone

Introduc)on to Computer Networks

Mobility Tolerant Broadcast in Mobile Ad Hoc Networks

CS649 Sensor Networks IP Lecture 9: Synchronization

Link State Routing. Stefano Vissicchio UCL Computer Science CS 3035/GZ01

Wireless Networks Do Not Disturb My Circles

Sensor Networks and the Future of Networked Computation

Problem Set 10 Solutions

TIME- OPTIMAL CONVERGECAST IN SENSOR NETWORKS WITH MULTIPLE CHANNELS

Clock Synchronization

Green Codes : Energy-efficient short-range communication

Acknowledged Broadcasting and Gossiping in ad hoc radio networks

Analysis of Power Assignment in Radio Networks with Two Power Levels

Design of Parallel Algorithms. Communication Algorithms

Time-Optimal Information Exchange on Multiple Channels

Internet of Things Prof. M. Cesana. Exam June 26, Family Name Given Name Student ID 3030 Course of studies 3030 Total Available time: 2 hours

CSE 100: RED-BLACK TREES

Self-Adjusting Binary Search Trees. Andrei Pârvu

Universal Cycles for Permutations Theory and Applications

Lecture 20 November 13, 2014

CS 457 Lecture 16 Routing Continued. Spring 2010

Decision Mathematics D1 Advanced/Advanced Subsidiary. Friday 17 May 2013 Morning Time: 1 hour 30 minutes

CSCI 1590 Intro to Computational Complexity

Minimum-Latency Schedulings for Group Communications in Multi-channel Multihop Wireless Networks

ROUTING PROTOCOLS. Dr. Ahmed Khattab. EECE Department Cairo University Fall 2012 ELC 659/ELC724

COMP Online Algorithms. Paging and k-server Problem. Shahin Kamali. Lecture 11 - Oct. 11, 2018 University of Manitoba

Module 3 Greedy Strategy

Energy-Efficient Data Management for Sensor Networks

Online Frequency Assignment in Wireless Communication Networks

arxiv: v1 [cs.dc] 9 Oct 2017

Sensor Network Gossiping or How to Break the Broadcast Lower Bound

Broadcasting in Conflict-Aware Multi-Channel Networks

Routing Messages in a Network

Wireless Network Security Spring 2011

Wireless Internet Routing. IEEE s

Mobile Ad Hoc Networks Theory of Interferences, Trade-Offs between Energy, Congestion and Delay

Forward and backward DAWG matching. Slobodan Petrović

CHAPTER 5 PAPR REDUCTION USING HUFFMAN AND ADAPTIVE HUFFMAN CODES

Constructing K-Connected M-Dominating Sets

Communication Theory II

Topology Control. Chapter 3. Ad Hoc and Sensor Networks. Roger Wattenhofer 3/1

Agenda. A short overview of the CITI lab. Wireless Sensor Networks : Key applications & constraints. Energy consumption and network lifetime

Lightweight Decentralized Algorithm for Localizing Reactive Jammers in Wireless Sensor Network

Cooperative Routing in Wireless Networks

((( ))) CS 19: Discrete Mathematics. Please feel free to ask questions! Getting into the mood. Pancakes With A Problem!

Cooperative Broadcast for Maximum Network Lifetime. Ivana Maric and Roy Yates

LECTURE VI: LOSSLESS COMPRESSION ALGORITHMS DR. OUIEM BCHIR

Lectures: Feb 27 + Mar 1 + Mar 3, 2017

Control issues in cognitive networks. Marko Höyhtyä and Tao Chen CWC-VTT-Gigaseminar 4th December 2008

Introduction to Local and Wide Area Networks

Variations on the Index Coding Problem: Pliable Index Coding and Caching

Bit Reversal Broadcast Scheduling for Ad Hoc Systems

Configuring OSPF. Information About OSPF CHAPTER

On the Capacity of Multi-Hop Wireless Networks with Partial Network Knowledge

Overview: Routing and Communication Costs

Low-Power Interoperability for the IPv6 Internet of Things

Superimposed Code Based Channel Assignment in Multi-Radio Multi-Channel Wireless Mesh Networks

Grundlagen der Rechnernetze. Introduction

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MH1301 DISCRETE MATHEMATICS. Time Allowed: 2 hours

Simple, Optimal, Fast, and Robust Wireless Random Medium Access Control

Computing functions over wireless networks

On Achieving Local View Capacity Via Maximal Independent Graph Scheduling

Overview: Routing and Communication Costs Store-and-Forward Routing Mechanisms and Communication Costs (Static) Cut-Through Routing/Wormhole Routing

Wireless in the Real World. Principles

Connected Identifying Codes

Tiling Problems. This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane

CS256 Applied Theory of Computation

Energy Saving Routing Strategies in IP Networks

OMESH Networks. OPM15 Application Note: Wireless Location and Tracking

Network-Wide Broadcast

ENERGY EFFICIENT DATA COMMUNICATION SYSTEM FOR WIRELESS SENSOR NETWORK USING BINARY TO GRAY CONVERSION

SCAM: Scenario-based Clustering Algorithm for Mobile Ad Hoc networks. V. S. Anitha & M. P. Sebastian National Institute of Technology Calicut Kerala

Multiple Access Methods

Evaluation of the 6TiSCH Network Formation

Aizaz U Chaudhry *, Nazia Ahmad and Roshdy HM Hafez. Abstract

Simultaneous optimization of channel and power allocation for wireless cities

Gateways Placement in Backbone Wireless Mesh Networks

OVSF-CDMA Code Assignment in Wireless Ad Hoc Networks

Introduction. Introduction ROBUST SENSOR POSITIONING IN WIRELESS AD HOC SENSOR NETWORKS. Smart Wireless Sensor Systems 1

A Randomized Algorithm for Gossiping in Radio Networks

A Factor Graph Based Dynamic Spectrum Allocation Approach for Cognitive Network

Transcription:

From Shared Memory to Message Passing Stefan Schmid T-Labs / TU Berlin Some parts of the lecture, parts of the Skript and exercises will be based on the lectures of Prof. Roger Wattenhofer at ETH Zurich and Prof. Christian Scheideler at University Paderborn.

Message Passing Many distributed systems do not have a shared memory, but pass messages along networks: social networks Pony express: mail along road networks Stefan Schmid @ T-Labs Berlin, 2011 2

Message Passing Many distributed systems do not have a shared memory, but pass messages along networks: Internet networks Internet Stefan Schmid @ T-Labs Berlin, 2011 3

Message Passing Many distributed systems do not have a shared memory, but pass messages along networks: but also wireless networks. Multi-hop sensor networks Stefan Schmid @ T-Labs Berlin, 2011 4

Fundamental Questions: Communication Network? Sometimes topology can be chosen (e.g., peer-to-peer networks)! What communication networks / architectures are good? A comparison. (degree-diameter tradeoff, network expansion, routing, robustness under dynamics, ) Line: simple, but long communication delays and not robust? Butterflies? 00 01 10 11 0 1 De Bruijn graphs? 001 010 101 000 011 111 2 100 110 Stefan Schmid @ T-Labs Berlin, 2011 5

What is the best degree / diameter tradeoff? Line: diameter n-1, degree 2 Clique: diameter 1, degree n-1 Hypercube: diameter log n, degree log n Can we reduce both? Yes. It must hold that degree diameter > n (why?) Pancake graphs: log n / loglog n diameter, log n / loglog n degree How to make these topologies robust and dynamic? (E.g., continuous-discrete approach) Stefan Schmid @ T-Labs Berlin, 2011 6

Fundamental Questions: Algorithms Fundamental tasks on networks: - Routing: sending a message from node A to node B? - Broadcasting: sending a message to all nodes? - Aggregation: Finding the most frequent element in the network? The node measuring the hottest temperature? Etc. - Electing a leader - Coloring the network (e.g., frequency spectrum allocation in wireless networks), computing independent sets, etc. Complexity evaluation: - Distributed runtime: number of communication rounds until task fulfilled? - Message complexity: number (and size) of messages to be transmitted? - Local complexity of algorithm: Complexity of algorithm in node? Stefan Schmid @ T-Labs Berlin, 2011 7

Example: Local Vertex Coloring Local Algorithm Each processor / node must act based on information about its k-hop neighborhood! (Fast and efficient algorithms, good under dynamics!) Sometimes local algorithm can approximate even NP-hard problems quite well and fast! Vertex Coloring Nodes should color themselves such that no adjacent nodes have same color but minimize # colors! Used, e.g., for wireless spectrum allocation Stefan Schmid @ T-Labs Berlin, 2011 8

Local Algorithm Simplified round model, all nodes execute the same protocol, In one round: 1. send messages (message complexity) 2. receive messages 3. process messages (local computation complexity) Number of rounds until termination: time complexity Stefan Schmid @ T-Labs Berlin, 2011 9

Local Algorithm Simplified round model, all nodes execute the same protocol, In one round: 1. send messages (message complexity) 2. receive messages 3. process messages (local computation complexity) Number of rounds until termination: time complexity Stefan Schmid @ T-Labs Berlin, 2011 10

Local Algorithm Simplified round model, all nodes execute the same protocol, In one round: 1. send messages (message complexity) 2. receive messages 3. process messages (local computation complexity) Number of rounds until termination: time complexity Stefan Schmid @ T-Labs Berlin, 2011 11

Local Algorithm Simplified round model, all nodes execute the same protocol, In one round: 1. send messages (message complexity) 2. receive messages 3. process messages (local computation complexity) Number of rounds until termination: time complexity Stefan Schmid @ T-Labs Berlin, 2011 12

Local Vertex Coloring for Rooted Tree? Ideas? (Assume, e.g., arbitrary but unique IDs are given at nodes) Stefan Schmid @ T-Labs Berlin, 2011 13

Local Vertex Coloring for Tree? Two colors suffice: root sends binary message down Stefan Schmid @ T-Labs Berlin, 2011 14

Local Vertex Coloring for Tree? Two colors suffice: root sends binary message down Stefan Schmid @ T-Labs Berlin, 2011 15

Local Vertex Coloring for Tree? Two colors suffice: root sends binary message down Stefan Schmid @ T-Labs Berlin, 2011 16

Local Vertex Coloring for Tree? Two colors suffice: root sends binary message down Time complexity? Message complexity? Local compuations? Stefan Schmid @ T-Labs Berlin, 2011 17

Local Vertex Coloring for Tree? Can we do faster than diameter of tree?! Yes! With constant number of colors in log*(n) time!! One of the fastest non-constant time algos that exist! ( Besides inverse Ackermann function or so) (log = divide by two, loglog =?, log* =?) log* (# atoms in universe) 5 Why is this good? If something happens (dynamic network), back to good state in a sec! How? You will learn. There is a lower bound of log-star too, so that s optimal! Stefan Schmid @ T-Labs Berlin, 2011 18

How does it work? Initially: each node has unique log(n)-bit ID = legal coloring (interpret ID as color => n colors) 0010110000 1010010000 0110010000 Idea: root should have label 0 (fixed) in each step: send ID to c v to all children; receive c p from parent and interpret as little-endian bit string: c p =c(k)c(0) let i be smallest index where c v and c p differ set new c v = i (as bit string) c v (i) until c v {0,1,2,,5} (at most 6 colors) Stefan Schmid @ T-Labs Berlin, 2011 19

How does it work? Initially: each node has unique log(n)-bit ID = legal coloring (interpret ID as color => n colors) 0010110000 0110010000 1010010000 Round 1 Idea: root should have label 0 (fixed) in each step: send ID to c v to all children; receive c p from parent and interpret as little-endian bit string: c p =c(k)c(0) let i be smallest index where c v and c p differ set new c v = i (as bit string) c v (i) until c v {0,1,2,,5} (at most 6 colors) Stefan Schmid @ T-Labs Berlin, 2011 20

How does it work? Initially: each node has unique log(n)-bit ID = legal coloring (interpret ID as color => n colors) Differ at position 5 = (0101) 2 0010110000 0010110000 1010010000 01010 1010010000 Round 1 Differ at position 8 = (1000) 2 1010010000 0110010000 10001 0110010000 Idea: root should have label 0 (fixed) in each step: send ID to c v to all children; receive c p from parent and interpret as little-endian bit string: c p =c(k)c(0) let i be smallest index where c v and c p differ set new c v = i (as bit string) c v (i) until c v {0,1,2,,5} (at most 6 colors) Stefan Schmid @ T-Labs Berlin, 2011 21

How does it work? Initially: each node has unique log(n)-bit ID = legal coloring (interpret ID as color => n colors) 10010 01010 Round 2 10001 Idea: root should have label 0 (fixed) in each step: send ID to c v to all children; receive c p from parent and interpret as little-endian bit string: c p =c(k)c(0) let i be smallest index where c v and c p differ set new c v = i (as bit string) c v (i) until c v {0,1,2,,5} (at most 6 colors) Stefan Schmid @ T-Labs Berlin, 2011 22

How does it work? Initially: each node has unique log(n)-bit ID = legal coloring (interpret ID as color => n colors) Differ at position 3 = (11) 2 10010 10010 01010 111 01010 Round 2 10001 Idea: root should have label 0 (fixed) in each step: send ID to c v to all children; receive c p from parent and interpret as little-endian bit string: c p =c(k)c(0) let i be smallest index where c v and c p differ set new c v = i (as bit string) c v (i) until c v {0,1,2,,5} (at most 6 colors) Stefan Schmid @ T-Labs Berlin, 2011 23

How does it work? Initially: each node has unique log(n)-bit ID = legal coloring (interpret ID as color => n colors) 111 Round 3, 001 etc. Idea: root should have label 0 (fixed) in each step: send ID to c v to all children; receive c p from parent and interpret as little-endian bit string: c p =c(k)c(0) let i be smallest index where c v and c p differ set new c v = i (as bit string) c v (i) until c v {0,1,2,,5} (at most 6 colors) Stefan Schmid @ T-Labs Berlin, 2011 24

Why does it work? Why is this log* time?! Idea: In each round, the size of the ID (and hence the number of colors) is reduced by a log factor: To index the bit where two labels of size n bits differ, log(n) bits are needed! Plus the one bit that is appended Why is this a valid vertex coloring?! Idea: During the entire execution, adjacent nodes always have different colors (invariant) because: IDs always differ as new label is index of difference to parent plus own bit there (if parent would differ at same location as grand parent, at least the last bit would be different). Stefan Schmid @ T-Labs Berlin, 2011 25

Lower Bound r-hop View R-hop view of a node v defined as set of states of all nodes in r-hop neighborhood of v. Neighborhood Graph Vertices of neighborhood graph are r-hop views; vertices are connected if views could result from adjacent nodes! Observe: Any deterministic vertex coloring algorithm can be seen as mapping r- hop neighborhoods to colors. Observe: Chromatic number of neighborhood graph (classic coloring) implies possible local algorithm coloring. => Gives us lower bound of possible colorings with r-neighborhood! Stefan Schmid @ T-Labs Berlin, 2011 26