Download
leader election and mutual exclusion algorithms for wireless ad hoc networks n.
Skip this Video
Loading SlideShow in 5 Seconds..
Leader Election and Mutual Exclusion Algorithms for Wireless Ad Hoc Networks. PowerPoint Presentation
Download Presentation
Leader Election and Mutual Exclusion Algorithms for Wireless Ad Hoc Networks.

Leader Election and Mutual Exclusion Algorithms for Wireless Ad Hoc Networks.

193 Views Download Presentation
Download Presentation

Leader Election and Mutual Exclusion Algorithms for Wireless Ad Hoc Networks.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Leader Election and Mutual Exclusion Algorithms for Wireless Ad Hoc Networks. CPSC 661 Distributed Algorithms Abhishek Gaurav Alok Madhukar

  2. Part 1: Leader Election Algorithms for Wireless Ad Hoc Networks • What is a mobile ad hoc network? • Use of Leader election in mobile systems • Challenges in making algorithms for mobile ad hoc network. • Model and Assumptions • Earlier Algorithms • Overview of Leader Election Algorithm • The Algorithm • Conclusion

  3. Wireless Networks – Operating Modes Infrastructure Mode Ad Hoc Mode

  4. Wireless Ad Hoc Networks - Characteristics - Wireless - Highly Mobile - No Access Points/Infrastructure - All nodes are peers - All nodes are routers - Network is formed dynamically

  5. Wireless Ad Hoc Networks - Routing Alok Ian

  6. Wireless Ad Hoc Networks - Routing Alok Gabriel Ian

  7. Wireless Ad Hoc Networks - Routing Abhishek Alok Lisa Ian Gabriel

  8. Use of Leader Election in Mobile Systems • Useful building block when failures are frequent • Lost Token in Mutual Exclusion • Group Communication Protocols • New Coordinator when Group Membership changes

  9. Challenges in making Algorithms for Wireless Ad Hoc Networks • Communication link – function of position, transmission power levels, antenna patterns, co-channel reference levels, etc. • Frequent and unpredictable Topological Changes • Congested Links

  10. New Definition Vs Classical Definition - Classical Definition 1. Eventually there is a leader with termination detection 2. There should never be more than one leader - New Definition 1. Any component whose topology is static sufficiently long will eventually have a leader with termination detection 2. There should never be more than one leader for any given component

  11. Basic Ideas - Leader-Oriented DAG - Partition from Leader - Merging of Components - Multiple Topology Changes

  12. System Model - N independent mobile nodes - Message passing over wireless network - Network – dynamically changing, not necessarily connected, a graph with nodes as vertices and edges between nodes that can communicate

  13. Assumptions on System Model - Nodes have unique node identifiers - Communication links are bidirectional, reliable, FIFO - Link level protocol: aware of the neighbors - One Topological change at a time

  14. Problem Statement - For every connected component C of the topology graph, there is a node l in C, s.t. lidi = l for each node i in C. - Eventually, each connected component is a directed acyclic graph with the leader as the single sink (leader-oriented DAG)

  15. Existing Algorithms • Shortest Path and Adaptive Shortest Path Algorithms • Designed for static and quasi-static hard-wired links • Do not react fast enough to maintain routing • Only 1 path for routing between any source/destination pair • Link State Algorithms • Maintain multiple path for routing • Time and communication overhead associated with maintaining full topological knowledge at each router makes them impractical

  16. Introduction of Link Reversal Routing - Objectives • Executes in a distributed environment • Provides loop-free routes • Provides multiple routes (to alleviate congestion) • Establishes routes quickly • Minimize communication overhead by localizing algorithmic reaction to topological changes when possible

  17. Link Reversal Routing (LRR) - Approach • LRR Algorithms maintain only distributed state information sufficient to constitute an Directed Acyclic Graph (DAG), rooted at the destination • Maintenance of a distributed DAG is desirable, as it guarantees loop-freedom and can provide participating nodes with multiple, redundant routes to the destination • Route maintenance is triggered when a node i loses the link to its last downstream neighbor

  18. Basis • Gafni – Bertsekas Algorithm [1]: 1981 • Temporally Ordered Routing Algorithm (TORA) [2]: 1997

  19. Leader Oriented DAG Reference2 Height2 Height1 Height2 > Height1 Reference2 > Reference1 Reference1 fig. A Leader Oriented DAG

  20. Leader Election Algorithm - An Overview A D B E C fig. C is in trouble (It has no outgoing link)

  21. Leader Election Algorithm - An Overview (cont’d…) C A D B E fig. C becomes originator of a new higher reference level

  22. Leader Election Algorithm - An Overview (cont’d…) C A D B E fig. E is in trouble and sees that neighbors have different levels

  23. Leader Election Algorithm - An Overview (cont’d…) C E A D B fig. E goes to new reference level and selects height just below C

  24. Leader Election Algorithm - An Overview (cont’d…) C E A D B fig. Link from C to E is not reversed, but link from D to E is reversed

  25. Leader Election Algorithm - An Overview (cont’d…) C E A D B fig. D in trouble

  26. Leader Election Algorithm - An Overview (cont’d…) C E D A B fig. D goes to new reference level and selects height just below E

  27. Leader Election Algorithm - An Overview (cont’d…) C E D A B Everyone is happy  fig. Links C to D and E to D are intact but A to D reverse

  28. Leader Election Algorithm - An Overview (cont’d…) C E D A B Alas!! fig. Link Break disconnects the component from leader

  29. Leader Election Algorithm - An Overview (cont’d…) C E D A B fig. B is in trouble since it has lost all outgoing links

  30. Leader Election Algorithm - An Overview (cont’d…) C E B D A fig. B selects new height in new (highest) reference level

  31. Leader Election Algorithm - An Overview (cont’d…) C E B D A A sees something different !! – All neighbors are in higher level fig. A is in trouble

  32. Leader Election Algorithm - An Overview (cont’d…) A C E B D {φ} fig. A creates higher sublevel within the new sub-level

  33. Leader Election Algorithm - An Overview (cont’d…) A C E B D {φ} fig. All links to A are reversed

  34. Leader Election Algorithm - An Overview (cont’d…) A C E B D C knows that there is no route to the leader fig. Higher Sub-level is reflected back to C (originator)

  35. Leader Election Algorithm - An Overview (cont’d…) A C E B D All nodes adjust their height w.r.t. leader fig. C elects itself the leader and propagates the message

  36. Leader Election Algorithm - An Overview (cont’d…) A C E B D Everyone is happy again  fig. The separated component becomes a leader-oriented DAG

  37. Node Height in LE The height of node i is an ordered six-tuple (lidi, τi, oidi, ri, δi, i) • lidi: id of the node believed to be the leader of i’s component • τi: the “logical time” of link failure, defining a new reference level • oidi: the unique id of the node that defined the reference level • ri: a bit used to divide each of the unique reference levels into two unique sub-levels – reflected and unreflected • δi: a “propagation” ordering parameter • i: the unique id of the node (τi, oidi, ri) represents the reference level and (δi, i) represents the “delta” or offset w.r.t. reference level. The reference level (-1,-1,-1) is used by the leader of a component to ensure that it is a sink.

  38. The Algorithm Node i: • Each step is triggered either by the notification of the failure or formation of an incident link or by the receipt of a message from a neighbor. • Local variable Ni: to store its neighbors' ids. When an incident link fails, i updates Ni. When an incident link forms, i updates Ni and sends an Update message over the link with its current height. • The only kind of message sent is an Update message, which contains the sender's height. • At the end of each step, if i's height has changed, then it sends an Update message with the new height to all its neighbors.

  39. The Algorithm (cont’d…) • When node i has no outgoing links due to a link failure: • if node i has no incoming links as well then • lidi := i • (τi, oidi, ri) := (-1,-1,-1) • δi := 0 • else • (τi, oidi, ri) := (t, i, 0) // t is the current time • δi := 0

  40. The Algorithm (cont’d…) B. When node i has no outgoing links due to a link reversal following reception of an Update message and the reference levels (τj, oidj, rj) are not equal for all j є Ni: • (τi, oidi, ri) := max{(τj, oidj, rj) I j є Ni) • δi := min{δj I j є Ni and (τj, oidj, rj) = (τi, oidi, ri)} - 1

  41. The Algorithm (cont’d…) C. When node i has no outgoing links due to a link reversal following reception of an Update message and the reference levels (τj, oidj, rj) are equal with rj = 0 for all j є Ni: • (τi, oidi, ri) := (τj, oidj, rj) for any jє Ni) • δi := 0

  42. The Algorithm (cont’d…) D. When node i has no outgoing links due to a link reversal following reception of an Update message and the reference levels (τj, oidj, rj) are equal with rj = 1 for all j є Ni: • lidi = i • (τi, oidi, ri) := (-1, -1, -1) • δi := 0

  43. The Algorithm (cont’d…) E. When node i receives an Update message from neighboring node j such that lidi ≠ lidj • if lidi > lidj or (oidi = lidjand ri = 1) then • lidi = lidj • (τi, oidi, ri) := (0, 0, 0) • δi := δj+ 1

  44. Example (A, -1, -1, -1, 0, A) (F, 2, A, 1, -1, D) (F, 0, 0, 0, 1, E) (F, 2, A, 1, 0, B) (F, -1, -1, -1, 0, F) (F, 0, 0, 0, 1, H) (F, 0, 0, 0, 2, G) fig.1 Node A detects a partition and elects itself as leader

  45. Example (cont’d…) Update (A, -1, -1, -1, 0, A) (A, 0, 0, 0, 1, D) (F, 0, 0, 0, 1, E) Update (A, 0, 0, 0, 1, B) (F, -1, -1, -1, 0, F) (F, 0, 0, 0, 1, H) (F, 0, 0, 0, 2, G) fig.2 Nodes B and D update their heights

  46. Example (cont’d…) (A, 0, 0, 0, 1, D) (A, -1, -1, -1, 0, A) Update (A, 0, 0, 0, 2, E) (A, 0, 0, 0, 1, B) (F, -1, -1, -1, 0, F) (F, 0, 0, 0, 1, H) (F, 0, 0, 0, 2, G) fig.3 Nodes B and E detect link formation and node E changes leader

  47. Example (cont’d…) (A, 0, 0, 0, 1, D) (A, -1, -1, -1, 0, A) (A, 0, 0, 0, 2, E) (A, 0, 0, 0, 1, B) Update (A, 0, 0, 0, 3, F) (F, 0, 0, 0, 1, H) (F, 0, 0, 0, 2, G) fig.4 Node F propagates leader change

  48. Example (cont’d…) (A, 0, 0, 0, 1, D) (A, -1, -1, -1, 0, A) (A, 0, 0, 0, 2, E) (A, 0, 0, 0, 1, B) (A, 0, 0, 0, 3, F) Update (A, 0, 0, 0, 4, H) (F, 0, 0, 0, 2, G) fig.5 Node H propagates leader change

  49. Example (cont’d…) (A, 0, 0, 0, 1, D) (A, -1, -1, -1, 0, A) (A, 0, 0, 0, 2, E) (A, 0, 0, 0, 1, B) (A, 0, 0, 0, 3, F) Update (A, 0, 0, 0, 4, H) (A, 0, 0, 0, 5, G) fig.6 Node G propagates leader change

  50. Proof of Correctness We believe the proof that each component is a leader – oriented DAG with the assumption of one change at a time can be converted to simple graph-theoretic proof and we are working on it.