Créer une présentation
Télécharger la présentation

Télécharger la présentation
## Abstract MAC Layers

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Abstract MAC Layers**Nancy Lynch MIT CSAIL February 24, 2010 Joint work with Fabian Kuhn and Cal Newport [DISC 2009]**For many years, we have been working on:**• Algorithms, lower bounds, impossibility results, for problems to be solved in distributed systems. • Problems: Communication, consensus, data management, resource allocation, synchronization,… • Distributed systems: Mainly, traditional wired networks. • Modeling and analysis methods for distributed algorithms and systems. • I/O automata • Timed I/O Automata • Probabilistic I/O Automata • The theory is pretty well developed.**Distributed Algorithms for Wireless Networks**• We would like the same kind of theory for wireless networks. • Problems, algorithms, analysis, lower bounds, impossibility results. • And they should all fit together in a common theory. • What kinds of problems? • Basic: Clock synchronization, localization. • Communication: Network-wide broadcast, point-to-point communication (message routing). • Building and maintaining network structures: Spanning trees, routes, clusters, leaders, dominating sets. • Auxiliary services: Consensus, group membership, distributed shared memory, resource allocation. • Applications: Data management, control (robots, vehicles).**Applications**Auxiliary services Communication Network Structures Basic services Problems for Wireless Networks • Basic: Clock synchronization, localization. • Communication: Network-wide broadcast, point-to-point communication (message routing). • Building and maintaining network structures: Spanning trees, routes, clusters, leaders, dominating sets. • Auxiliary services: Consensus, group membership, distributed shared memory, resource allocation. • Applications: Data management, robot motion coordination, vehicle motion coordination. • We (and others) have results on many of these individual problems. • But no one has fit them all together.**Some individual results**• Rambo reconfigurable distributed shared memory algorithm [Gilbert, Lynch, Shvartsman 02, 04] • Intruder tracking [Arora, Demirbas, Lynch, Nolte 04, 07] • Gradient clock synchronization [Fan, Lynch 06], [Kuhn, Locher, Oshman 09], [Kuhn, Oshman 09] • Virtual nodes [Brown, Chockler, Demirbas, Dolev, Gilbert, Lahiani, Lynch, Mitra, Newport, Nolte, Shvartsman, Spindel, Welch, 03-08] • Consensus [Chockler, Demirbas, Gilbert, Lynch, Newport, Nolte 05, 08] • Motion coordination [Gilbert, Lynch, Mitra, Nolte 05, 08] • Connectivity of robot swarms [Cornejo, Lynch 08], [Cornejo, Kuhn, Ley-Wild, Lynch 09]**What’s different about wireless networks?**• Local broadcast communication: Message can reach many nodes. • Success of message delivery depends on distance between sender and receiver and on complex signal propagation patterns. • Contention: Different senders may send at the same time, leading to message collisions and loss. • Dynamic behavior: Nodes may fail, recover, join, leave. • Mobility: • A good theory for wireless networks must take these complications into account.**Signal propagation patterns**• Can be complicated: • Unequal propagation in different directions. • Multipath effects. • Existing theory assumes idealized models: • Uniform propagation in all directions • Unit disk: • Quasi-unit-disk**Contention**• Contention management strategies: • Binary Exponential Backoff. • Send repeatedly, adjusting probabilities. • ZigZag Decoding [Gollakota, Katabi 08]**Contention management in high-level algorithms**• Algorithms for high-level tasks that are designed to run in collision-prone networks must manage contention, as well as performing high-level algorithmic work. • The combination can be very complicated. • Often most of the complexity involves contention management! • Example: Network-wide single-message broadcast [Bar-Yehuda, Goldreich, Itai 92] • Decay subroutine, decreases sending probabilities exponentially, repeats many times. • Main broadcast protocol: When a node first receives the message, it retransmits it using Decay.**Contention management in high-level algorithms**• There has been considerable follow-on work. • Repetitious: • Different algorithms for network-wide broadcast and related problems perform similar work of managing contention. • Complicated: • Combination of high-level algorithm + contention management is pretty complicated. • Limits the complexity of algorithms that can be studied. • Unclear how results depend on assumptions: • Hard to trace dependence of algorithms on particular assumptions about signal patterns, collisions, failures,... • So must reprove results for different models.**Applications**Auxiliary services Communication Network Structures Basic services Contention management in high-level algorithms • Repetitious. • Complicated. • Unclear how results depend on assumptions. • So, not an adequate approach for a general theory for wireless algorithms. • We need something better…**We need good abstractions!**• In particular, at the lowest level, to mask some of the complexities of the physical networks, such as signal patterns and collisions. • [Walter, Welch, Vaidya]: • Dynamic graph model. • Ignore contention; assume reliable, fast local communication. • Study many high-level problems. • Simple, but unrealistically optimistic. • [Gilbert, Newport,…]: • Use abstract collision detection, contention management services • More realistic, but complicated. • We need abstractions that are realistic, yet not too complicated.**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Need Abstractions • Realistic, but not too complicated… • New approach: Abstract MAC service • Reliable local message broadcast communication, with time bounds that depend on the amount of local contention. • Expressed in terms of delay functions,which are bounds on: • Time for a message to reach a particular neighboring node, • Time for sender to know a message has been received by all neighbors, and • Time for a receiver to receive some message when some neighbor is sending.**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Abstract MAC Service • Reliable local message broadcast communication, with time bounds that depend on the amount of local contention. • Delay functions, bounds on: • Time for message to reach a particular neighboring node, • Time for sender to know message has been received by all nbrs, • Time for receiver to receive some message when some neighbor is sending. • Stated as simple worst-case bounds, but sometimes consider that they may be achieved with high probability. • Usual contention-management strategies are designed to achieve such guarantees.**Multi-Message Broadcast Algorithms using Abstract MAC Layers**• Studied problem of Multi-Message Broadcast, broadcasting many messages throughout a network. • Algorithm 1: Simple greedy algorithm over Abstract MAC layer, global delivery time for message m bounded by O( (D + k) Fprog + (k-1) Fack ), where: • D = network diameter • k bounds the number of messages whose broadcast overlaps m, • Fprog bounds receiver’s time to receive something, • Fack bounds sender’s time to complete a local broadcast. • Algorithm 2: Uses regional leaders, O( D + k + bFprog + Fack), • b bounds the length of a node id. • Extends to dynamic networks.**Work in progress**• We are: • Demonstrating how our Abstract MAC Layer can be implemented using existing methods of probabilistic transmission and network coding. • Showing how one can use such layers to simplify the analysis of existing algorithms, by splitting the algorithms and their analysis into smaller pieces. • Showing how our layer can be used to solve other problems, such as Neighbor Discovery. • And there is much more to be done…**Talk Outline**• Introduction • Abstract MAC layers • Using Abstract MAC layers for broadcast in static networks • Using Abstract MAC layers for broadcast in dynamic networks • Current work: • Decomposing the analysis of complex broadcast algorithms • Neighbor discovery • Zig-zag decoding implementations • Conclusions and future work**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Abstract MAC Service • Reliable local message broadcast communication, with time bounds that depend on the amount of local contention. • Delay functions, bounds on: • Time for message to reach a particular neighboring node, • Time for sender to know message has been received by all nbrs, • Time for receiver to receive some message when some neighbor is sending. • Stated as simple worst-case bounds, but sometimes consider that they may be achieved with high probability. • Usual contention-management strategies are designed to achieve such guarantees.**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Abstract MAC layer interface • bcast(m): Send message m. • rcv(m): Deliver message m to a particular node. • ack(m): Tell sender of m that “everyone who should” has received the message. • abort(m): Stop processing on behalf of currently-active message m.**Delivery and ack guarantees**• Message delivery and ack guarantees depend on the underlying physical network. • We specify this abstractly in terms of two dynamic (directed or undirected) graphs, G and G. • G: Messages mustbe delivered, guaranteed communication • G: Messages may be delivered, possible communication or interference. • G and G defined in terms of node locations and signal patterns. • Dynamic: As nodes move, or the physical environment changes, the graphs G and G change accordingly. G = (V, E), G = (V, E) E E**Delivery and ack guarantees**• Local broadcast (to all neighbors). • A message reachesall G-neighbors and no non-G-neighbors. • It might reach some G-neighbors that aren’t G-neighbors. • If G and G change, requirements become weaker: • Required to reach only those nodes connected in G for the entire broadcast interval. • Allowed to reach only those nodes connected in G at some point in the broadcast interval.**Delivery and ack guarantees**• Termination: If the sender doesn’t abort a message, the MAC will eventually ack it. • Ack correctness: An ackis preceded by rcvs at all nodes that remain G-connected to sender. • Well-formedness: Each sender must wait until its previous message is acked before bcasting another one. • Time bound guarantees: Time for local broadcast depends on local contention.**How do we measure contention?**• Contention c at a node i is the number of G-neighbors with active local broadcasts. Node i Contention = 2**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Receive bound • frcv(c) • If a node i does a bcast(m) that is received by j, then the time until rcv(m) at j is at most frcv(c), where c is the contention at the receiver j. • frcv(c) must be at least linear in c.**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Acknowledgement bound • fack(c) • If a node i does a bcast(m) that results in an ack(m), then the time until ack(m) is at most fack(c), where c is the total contention at the sender and all of its G-neighbors. • fack(c) is even larger than frcv(c).**Progress bound**• frcv, fack: Guaranteed bounds for all messages. • Most messages take a long time, so frcv and fack are large. • Some messages will be much faster. • Progress bound: Guarantees some messages are fast.**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Progress bound • fprog(c) • If a node j has at least one G-neighbor with an active local bcast, then the time until j receives some message from some G-neighbor is at most fprog(c), where c is the contention at j. • frcv(c) can be much smaller than frcv and fack, e.g., poly-logarithmic in c.**Why is a small progress bound interesting?**• Consider global broadcast of a message m. • At some point, some nodes have received m, others haven’t. • Receiving m from any neighbor is good enough!**bcast**abort rcv ack bcast abort rcv ack Abstract MAC Abstract MAC time bounds (summary) • frcv(c): Upper bound on time from sending to receipt of a message, when the contention at the receiver is bounded by c. • fack(c): Upper bound on time from sending to ack at sender, when the total contention at the sender and all its receivers is bounded by c. • fprog(c): Upper bound on time for a receiver to receive some message from among a collection of messages by contending senders, when contention at the receiver is bounded by c.**bcast**abort rcv ack bcast abort rcv ack Abstract MAC What Abstract MAC does not provide: • Neighborhood knowledge: • Guarantees nearby nodes receive a message, distant nodes don’t. • But the sender doesn’t know who is nearby, nor who receives the message. • To gain such information, nodes must do more, e.g., run a Neighbor Discovery protocol over the MAC layer. • Unicast/ack • Can implement this over the MAC layer.**What can we do with Abstract MAC layers?**• Solve higher-level problems over the layers. • Describe and analyze algorithms to implement the layers over physical network models. • Combine the analyses to get overall bounds for high-level algorithms over physical network models.**j**i Single-Message Broadcast • Assume static, undirected graphs G and G. • Theorem: Broadcasting a message m to all nodes takes time at most D Fprog, where: • D = diameter of G, and • Fprog = f prog(+1), where is the maximum degree in G. • Proof: Easy (because we don’t have to analyze contention). • Consider source i, path of length d from i to receiver j. • Time for m to progress one hop along the path is at most Fprog.**Multi-Message Broadcast (MMB)**• Messages originate anywhere, at any times. • Everyone should receive every message. • Basic Multi-Message Broadcast (BMMB) algorithm: • Simple greedy algorithm. • Each process maintains a local queue of messages it has received. • Sends messages from its queue in order, using Abstract MAC, waiting for an ack for the previous message before sending the next. • Handles each message only once. • Messages can delay other messages all along the way. • Nevertheless, we obtain:…**Multi-Message Broadcast using BMMB**• Assume G = G. • Theorem: Broadcasting a message m to all nodes takes time at most O((D + k) Fprog + (k-1) Fack), where: • D, , Fprog as before, • k number of messages whose broadcast overlaps m, • Fack = f ack((+1)2). • Diameter is multiplied only by (small) Fprog, not by Fack. • Captures the effect of pipelining. • Proof: Not so easy, but still tractable (because we don’t worry about contention). • Double induction, on the number k of messages, and on the distance d to a receiver. • Although messages can block other messages, some messages always make progress. • “Either m gets through quickly, or a lot of other messages do.”**j**i Multi-Message Broadcast using BMMB • Theorem: Broadcasting a message m to all nodes takes time at most O( (D + k) Fprog + (k-1) Fack ). • Proof: • Double induction, on the number k of messages, and on the distance d to a receiver. • Key idea: Once a particular set M of k-1 messages is completely finished along a G-path from i to j, and i has another message not in M, then some message not in M reaches j quickly, in time dist(i,j) Fprog.**Can we do better?**• Idea: • Use geographical information. • Divide the plane into regions. • Elect leaders in regions and let them handle the message transmission.**Can we do better?**• Idea: • Use geographical information. • Divide the plane into regions. • Elect leaders in regions and let them handle the message transmission.**Regional Leader Election**• Elect a leader in each region. • Assume regions are all occupied. • Basic algorithm: Within each region, everyone sends their identifiers, elect max. • Time complexity: O(Fack) • Better algorithm: Selects leader based on bit representations of node identifiers. • Time complexity: O( b Fprog), where b = number of bits in a node identifier.**Region-Based Multi-Message Broadcast**• Algorithm: Broadcast as in BMMB, but on the network of leaders. • Good enough, because other nodes hear messages from their region’s leader. • Uses a Collect sub-algorithm to transfer arriving messages from individual nodes to their leaders. • Assumes a bound on arrival rates sufficient to avoid queue overflow (1 / Fack).**Region-Based Multi-Message Broadcast**• Theorem: Broadcasting a message m to all nodes takes time O(D + k + b Fprog + Fack). • Which is better than the previous bound, O((D + k) Fprog + (k-1) Fack). • Savings arises because, when only leaders broadcast, the contention is constant-bounded. • Interesting, not-so-simple broadcast algorithm. • Tractable analysis, because we don’t worry about contention. • Can extend to G G.**Using Abstract MAC layers for Broadcast, in Dynamic Networks****Multi-Message Broadcast in Dynamic Networks**• Now suppose the nodes can move in the plane. • We can adapt the region-based broadcast algorithm. • Dynamic algorithm consists of: • Dynamic Leader Election • Dynamic Collect • Dynamic Broadcast on Leader Network • Ensures that messages are delivered everywhere even though nodes move between regions. • Assumption: When a process enters a region, it records a region exit time bound, and promises to remain in the region at least until this time.**Dynamic Leader Election**• Leader election runs concurrently with Collect and Broadcast. • Maintains regional leaders as nodes move, choosing new leaders when necessary. • Algorithm: • Runs static leader election algorithm repeatedly. • Each time: • If there is a current leader, and its exit bound is not too soon, then retain the leader. • Otherwise, choose the node with the largest exit bound.**Dynamic Leader Election**• Leader election runs concurrently with Collect and Broadcast. • Maintains regional leaders as nodes move, choosing new leaders when necessary. • Algorithm: • Runs static leader election algorithm repeatedly. • Each time: • If there is a current leader, and its exit bound is not too soon, then retain the leader. • Otherwise, choose the node with the largest exit bound.**Dynamic Leader Election**• Leader election runs concurrently with Collect and Broadcast. • Maintains regional leaders as nodes move, choosing new leaders when necessary. • Algorithm: • Runs static leader election algorithm repeatedly. • Each time: • If there is a current leader, and its exit bound is not too soon, then retain the leader. • Otherwise, choose the node with the largest exit bound.**Dynamic Collect**• Transfers arriving messages from the front of a non-leader node i’s arrival queue to its leader j’s broadcast queue, provided that: • i and j remain in their region, and • j remains a leader, for sufficiently long after the message arrival. • Algorithm: Uses a broadcast from i to j and an ack from j to i, both sent over the MAC layer.**Dynamic Broadcast on Leader Network**• Propagates message m from broadcast queue of a leader i in a region r to broadcast queues of leaders in all adjacent regions. • Algorithm: • Broadcasts on the leader network as in BMMB. • If a leader becomes a non-leader, it empties its broadcast queue into its arrival queue.**Dynamic Broadcast on Leader Network**• Propagates message m from broadcast queue of a leader i in a region r to broadcast queues of leaders in all adjacent regions. • Algorithm: • Broadcasts on the leader network as in BMMB. • If a leader becomes a non-leader, it empties its broadcast queue into its arrival queue.