1 / 27

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems. Spring 2009 Prof. Jennifer Welch. Lecture 30. Topic: Compulsory Protocols Sources: Hatzis,Pentaris, Spirakis, Tampakas & Tan Chatzigiannakis, Nikoletseas & Spirakis MIT 6.885 Fall 2008 slides.

crushing
Download Presentation

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems

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. CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch

  2. Lecture 30 • Topic: • Compulsory Protocols • Sources: • Hatzis,Pentaris, Spirakis, Tampakas & Tan • Chatzigiannakis, Nikoletseas & Spirakis • MIT 6.885 Fall 2008 slides Discrete Algs for Mobile Wireless Sys

  3. Algorithms for Mobile Ad Hoc Networks • Focus on the mobility of the nodes • Classify protocols into 3 types: • Non-compulsory: nodes move however they like (controlled by other protocols/ applications/ …) • Compulsory: movement of all nodes is directed by the protocol • Semi-compulsory: movement of some nodes is directed by the protocol • Consider protocols for leader election, message routing, and counting the number of nodes in the system Discrete Algs for Mobile Wireless Sys

  4. Network Model • m mobile nodes in 3-D space • Space is partitioned into n cells • approximate the broadcast sphere of a node with a regular polyhedron (e.g., a cube) • Graph G = (V,E) where |V| = n cells • degree of G bounded by a constant • ex: in a 3-D grid, number of neighbors is 6 • Transmission between 2 nodes in same cell is guaranteed • lower layer handles frequency allocation issues • Negligible transmission delays Discrete Algs for Mobile Wireless Sys

  5. Leader Election & Node Counting [HPSTT] • Problem: • Elect a unique leader among the m nodes • All other nodes should know they are not the leader • Leader should also learn the total number of nodes • Assumptions: • Nodes know their geographic location and thus what cell they are in • Each node has a unique id (relaxed later) • Number of nodes does not change Discrete Algs for Mobile Wireless Sys

  6. Non-Compulsory Algorithm • Each node keeps a local counter, initialized to 1 • When two nodes meet (are in the same cell / within communication range of each other): • exchange ids • node with larger id wins • node with smaller id becomes "inactive" • winner adds the loser's count to its own count • Optimization: nodes bcast their entire list of ids encountered so far • ultimate leader knows all the nodes • larger messages Discrete Algs for Mobile Wireless Sys

  7. Analysis • No guaranteed termination: • only terminates if node with max id meets all the other nodes • No termination detection: • Even if node with max id meets all the other nodes, it can't know that it is finished • How to analyze? • Assume movement of each node is a random walk on the graph G of the 3-D space Discrete Algs for Mobile Wireless Sys

  8. Random Walk • Random walk is a path in the graph: • Node begins at some graph vertex • Randomly decides which neighbor to visit next • equal probability of choosing each neighbor • Continue • Can analyze various properties: • how long until all the vertices are visited • how long until you return to your start • how long to get from vertex i to vertex j • etc. Discrete Algs for Mobile Wireless Sys

  9. Analysis of LE Algorithm • Assume one node in each cell (m = n) • Model a node's random walk as a "continuous time Markov chain" • Let Mij be first meeting time of 2 nodes that start at cells (vertices) i and j • Let Cf be time when only one node is still active Discrete Algs for Mobile Wireless Sys

  10. Analysis • Lemma 3.2: Pr[Mij > t] decreases exponentially in t • As time goes by, it is more and more likely that the nodes that started at cells i and j will meet (be in the same cell) • Theorem 1: E[Cf] = O(log n maxij(Ei(Tj))) • Ei(Tj) is expected time for a node that starts in cell i to reach cell j • uses L. 3.2 and random walk theory to relate E[Mij] to Ei(Tj) • Corollary 3.1: E[Cf] = O(n log n) • appeals to full paper to show maxij(Ei(Tj)) = 2*number of edges in G Discrete Algs for Mobile Wireless Sys

  11. Improved Analysis • Notice that when two hosts meet, the counter of the winner, on average, will be doubled. • Then use some probability to show that the log n term in the previous expression becomes log of some constant and we get: • Theorem 2: E[Cf] = O(n) Discrete Algs for Mobile Wireless Sys

  12. Relaxing the m = n Assumption • Suppose m > n. • Then some cells start with multiple nodes. • A single winner per cell will emerge after the first step • Suppose m < n. • Worst case is when they are spread around. • Augment the algorithm to get n nodes with dummy nodes whose ids are smaller than those of the real nodes. • In both cases, expected time to finish is still O(n). • Since n is ratio of the volume of the space to the transmission radius volume, increasing the transmission radius will reduce n and lead to faster termination Discrete Algs for Mobile Wireless Sys

  13. Termination Detection • Inspired by the previous analysis, we can simply have all the nodes stop after a certain amount of time • There is some probability the algorithm will be wrong (have more than one leader) • but it is bounded by the length of time the protocol ran • Lemma 3.5: if protocol terminates after time t, then the probability of failure (i.e., probability Cf > t) is at most O(n/t). • depends on n (really on |E|) • so error probability depends on how many cells the space is divided into Discrete Algs for Mobile Wireless Sys

  14. Anonymous Networks • What if nodes do not have unique ids? • When two nodes meet and compete: • choose ids at random and exchange them • keep doing this until they choose different ids • How to count the total number of nodes in this case? Discrete Algs for Mobile Wireless Sys

  15. Simulation Results • Simulation results were actually even better than the analysis • Probably because the analysis did not assume anything about the underlying graph • but in the quantization scheme, the graph is regular and thus random walks "mix" faster Discrete Algs for Mobile Wireless Sys

  16. Semi-Compulsory Protocols [CNS] • Same set-up as in previous paper • 3-D space is quantized into cubic cells • Problem of interest is routing: • deliver a message from node S to node R • Possible solutions: • sender gives message to every node it meets in the hopes of eventually finding R • form paths of intermediate nodes lying w/in each other's transmission range • impractical in large sparse ad hoc networks; formation of long paths is infeasible; link failures are very likely Discrete Algs for Mobile Wireless Sys

  17. "Support" Approach • They consider networks where the highly dynamic movement of nodes makes maintaining valid paths impractical • Instead, take advantage of nodes' natural movement • exchange info when they meet • Also, force a small subset of nodes (the support) to move according to the needs of the protocol • The support acts as a moving intermediate pool fo rmessages • sweeps through the network area Discrete Algs for Mobile Wireless Sys

  18. Definitions •  : subset of mobile nodes (the support) whose motion is determined by the protocol of interest P • Me : the support management sub-protocol of P controlling how the support nodes move and communication • Me is k-fault tolerant if it executes correctly in the presence of at most k faults (crash failures) of nodes in  Discrete Algs for Mobile Wireless Sys

  19. Snake Protocol • Support nodes sweep the entire space quickly (think of a moving backbone in the network) • When a support node is within communication range of a sender, the sender is notified that it can send a message • Messages are stored in the support (e.g., copied to all nodes of the support) • When a receiver comes within range of a support node, the receiver is notified that a message is waiting for it and the message is forwarded to the receiver Discrete Algs for Mobile Wireless Sys

  20. Snake Protocol Details • Set-up phase in which k nodes become the support: • elect a leader MS0 • MS0 then identifies k-1 additional nodes MS1, …, MSk-1 and coordinates the support topology and movement • Snake: • all nodes start in the same cell • MS0 randomly chooses direction of next move, sends info to MS1, and the moves • MS1 sends direction info to MS2 and follows MS0 • etc. Discrete Algs for Mobile Wireless Sys

  21. Snake Protocol Discussion • Advantages: • They claim it achieves fast communication between any two mobile nodes • low communication overhead, no elaborate state • nodes don't use any location information • Disadvantage: • requires compulsory motion of support nodes Discrete Algs for Mobile Wireless Sys

  22. Analysis • Theorem 3.1: The Snake Protocol guarantees reliable communication between any sender-receiver pair in finite time, whose expected value is bounded only by a function of the size of the motion space (graph representing the quantization). • independent of the number of nodes • tolerates arbitrary motion of non-support nodes as long as they are not deliberately trying to avoid the support nodes Discrete Algs for Mobile Wireless Sys

  23. Fault-Tolerance • Snake Protocol can be made 1-fault tolerant. • Suppose last node fails. • no changes needed • Suppose head fails. • 2nd node can detect and take over as head. • Suppose an internal node fails. • Snake is broken into two. • The two new snakes meet eventually. • When they do (say x in S1 and y in S2 meet), they merge into one: • x follows the node ahead of y in S2 • rest of S1 waits to follow tail of S2. Discrete Algs for Mobile Wireless Sys

  24. Multiple Faults • Difficulties in applying the previous idea to more than 1 failure • Can get a deadlock situation with 4 snakes in a square Discrete Algs for Mobile Wireless Sys

  25. Choosing Size of Support • How big should k (size of support) be? • Analysis shows best choice is k = sqrt(2|E|c) • c is approximately the "separation threshold time" of the random walk on G Discrete Algs for Mobile Wireless Sys

  26. Extension to Snake Protocol • Have the head of the snake do a regular random walk on a spanning graph of G. • Improves performance in analysis and simulation. Discrete Algs for Mobile Wireless Sys

  27. Runners Protocol • Each support node performs an independent random walk on G. When two runners meet, they exchange any information given to them by senders • Each support node keeps track of undelivered messages and receipt lists • When two runners meet, they use 2-phase commit to synchronize the two lists • Performs better than Snake Protocol in experiments • Is k-1 fault tolerant Discrete Algs for Mobile Wireless Sys

More Related