Download presentation
Presentation is loading. Please wait.
1
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch
2
Discrete Algs for Mobile Wireless Sys2 Lecture 30 Topic: Compulsory Protocols Sources: Hatzis,Pentaris, Spirakis, Tampakas & Tan Chatzigiannakis, Nikoletseas & Spirakis MIT 6.885 Fall 2008 slides
3
Discrete Algs for Mobile Wireless Sys3 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
4
Discrete Algs for Mobile Wireless Sys4 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
5
Discrete Algs for Mobile Wireless Sys5 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
6
Discrete Algs for Mobile Wireless Sys6 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
7
Discrete Algs for Mobile Wireless Sys7 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
8
Discrete Algs for Mobile Wireless Sys8 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.
9
Discrete Algs for Mobile Wireless Sys9 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 M ij be first meeting time of 2 nodes that start at cells (vertices) i and j Let C f be time when only one node is still active
10
Discrete Algs for Mobile Wireless Sys10 Analysis Lemma 3.2: Pr[M ij > 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[C f ] = O(log n max ij (E i (T j ))) E i (T j ) 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[M ij ] to E i (T j ) Corollary 3.1: E[C f ] = O(n log n) appeals to full paper to show max ij (E i (T j )) = 2*number of edges in G
11
Discrete Algs for Mobile Wireless Sys11 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[C f ] = O(n)
12
Discrete Algs for Mobile Wireless Sys12 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
13
Discrete Algs for Mobile Wireless Sys13 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 C f > 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
14
Discrete Algs for Mobile Wireless Sys14 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?
15
Discrete Algs for Mobile Wireless Sys15 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
16
Discrete Algs for Mobile Wireless Sys16 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
17
Discrete Algs for Mobile Wireless Sys17 "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
18
Discrete Algs for Mobile Wireless Sys18 Definitions : subset of mobile nodes (the support) whose motion is determined by the protocol of interest P M e : the support management sub-protocol of P controlling how the support nodes move and communication M e is k-fault tolerant if it executes correctly in the presence of at most k faults (crash failures) of nodes in
19
Discrete Algs for Mobile Wireless Sys19 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
20
Discrete Algs for Mobile Wireless Sys20 Snake Protocol Details Set-up phase in which k nodes become the support: elect a leader MS 0 MS 0 then identifies k-1 additional nodes MS 1, …, MS k-1 and coordinates the support topology and movement Snake: all nodes start in the same cell MS 0 randomly chooses direction of next move, sends info to MS 1, and the moves MS 1 sends direction info to MS 2 and follows MS 0 etc.
21
Discrete Algs for Mobile Wireless Sys21 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
22
Discrete Algs for Mobile Wireless Sys22 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
23
Discrete Algs for Mobile Wireless Sys23 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 S 1 and y in S 2 meet), they merge into one: x follows the node ahead of y in S 2 rest of S 1 waits to follow tail of S 2.
24
Discrete Algs for Mobile Wireless Sys24 Multiple Faults Difficulties in applying the previous idea to more than 1 failure Can get a deadlock situation with 4 snakes in a square
25
Discrete Algs for Mobile Wireless Sys25 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
26
Discrete Algs for Mobile Wireless Sys26 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.
27
Discrete Algs for Mobile Wireless Sys27 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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.