Download presentation
Presentation is loading. Please wait.
1
1 Prioritized h-out of-k Resource Allocation for Mobile Ad Hoc Networks and Distributed Systems Jehn-Ruey Jiang Hsuan Chuang University HsinChu, Taiwan
2
2 Outline Mobile Ad hoc Network Distributed System Prioritized h-out of-k Mutual Exclusion Proposed Algorithm Concluding Remarks
3
3 Outline Mobile Ad hoc Network Distributed System Prioritized h-out of-k Mutual Exclusion Proposed Algorithm Concluding Remarks
4
4 Mobile Ad hoc Network MANET (by IETF) No Infrastructure, an anytime, anywhere network Multi-hop communication Link formations occur when nodes move within transmission range Link failures occur when nodes move out of transmission range Frequent and unpredictable topology changes
5
5
6
6 Outline Mobile Ad hoc Network Distributed System Prioritized h-out of-k Mutual Exclusion Proposed Algorithm Concluding Remarks
7
7 Distributed System A set of stationary, autonomous sites Connected by wired links Communicated by message passing A collection of independent computers that appear to the users as a single computer (by Andrew Tannenbaun)
8
8 Source: Prof. Harondi
9
9 Merits of Distributed System Resource Sharing: data, service, devices Computation Speedup: PVM, Grid, MetaComputer 10000 CPUs, each running at 50 MIPS, yields 500000 MIPS → instruction to be executed in 0.002 nsec → equivalent to light distance of 0.6 mm → any processor chip of that size would melt immediately Fault-tolerance to resist failures or to recover when failures occur
10
10 Outline Mobile Ad hoc Network Distributed System Prioritized h-out of-k Mutual Exclusion Proposed Algorithm Concluding Remarks
11
11 h-out of-k Mutual Exclusion (1/3) There are k (k 1) identical shared resources. The node may require to access h (1 h k) copies out of the k shared resources at a time. The total number of resources simultaneously accessed by nodes should not exceed k.
12
12 h-out of-k Mutual Exclusion (2/3) Application: CSCW (Computer Supported Cooperative Work) Examples: Multi-pen E-whiteboard Mutual driving group Cooperative robotics and nanorobotics
13
13 h-out of-k Mutual Exclusion (3/3) Application: IPAD (Inter-Personal Awareness Devices) Examples: Hummingbirds System Generalized Hummingbirds System Hocman System
14
14 Prioritized h-out of-k ME Using HPFS (highest priority first serve) instead of FCFS (first come first serve) Can be applied to systems with real time or prioritized applications, where each node is associated with a deadline or a priority
15
15 MANET and Distributed Primitives (1/2) General approach to implement distributed primitives ( such as mutual exclusion mechanism) User Applications Distributed Primitives Routing Protocol Mobile Ad Hoc Network
16
16 Our approach to implement distributed primitives ( such as mutual exclusion mechanism) User Applications Distributed PrimitivesRouting Protocol Mobile Ad Hoc Network MANET and Distributed Primitives (2/2)
17
17 Outline Mobile Ad hoc Network Distributed System Prioritized h-out of-k Mutual Exclusion Proposed Algorithm Concluding Remarks
18
18 Proposed Algorithm Overview Each node has 3 states: ES, CS, NCS Token-based: to maintains a token-oriented DAG (directed acyclic graph) where the token holder is the sink the node holding token to check whether t h to enter the CS (Critical Section) The counter in TOKEN storing the number of available resources The number of requested resources
19
19 Data Structure state: Indicates node’s state( ES, CS, or NCS) N: The set of all neighbors. height: A triplet (h1, h2, i). hVector: An array of triplets representing node i's view of height of node j, j N. next: Indicates the location of the token from node i's viewpoint. tokenHolder: Indicates whether or not node i holds the token. Q: a queue which contains requests of neighbors.
20
20 An Example A 5-node system (i.e., n=5), where each node is labeled 0,…,4. There are 3 resources (i.e., k=3). The TOKEN is held by node 0 initially. The height values form a DAG initially.
21
3 height=(0, 2, 3) h=0 1 0 2 4 height=(0, 1, 1) h=0 height= (0, 2, 4) h=0 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 TOKEN(3) Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Initially
22
3 height=(0, 2, 3) h=0 1 0 2 4 height=(0, 1, 1) h=2 height= (0, 2, 4) h=0 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 TOKEN(3) Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 1 requests 2 resources (1,2)
23
3 height=(0, 2, 3) h=1 1 0 2 4 height=(0, 1, 1) h=2 height= (0, 2, 4) h=0 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 TOKEN(3) Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 3 requests 1 resource Node 1’s request is sent to node 0 (1,2) (3,1)
24
3 height=(0, 2, 3) h=1 1 0 2 4 height=(0, 1, 1) h=2 height= (0, 2, 4) h=2 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 TOKEN(3) Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 3’s request is sent to node 1 Node 0 sends token to node 1 Node 4 requests 2 resources (3,1) (1,2) (3,1) (4,2)
25
3 height=(0, 2, 3) h=1 1 0 2 4 height=(0, -1, 1) h=2 height= (0, 2, 4) h=2 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 1 sends token to node 3 Node 4’s request is sent to nodes 2, 0, 1 (1,2) (4,2) (3,1) (1,2) TOKEN(3) (4,2)
26
3 height=(0,-2, 3) h=1 1 0 2 4 height=(0, -1, 1) h=2 height= (0, 2, 4) h=2 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 3 enters the CS (1,2) (4,2) (1,2) TOKEN(2) CS (4,2)
27
3 height=(0, -2, 3) h=1 1 0 2 4 height=(0, -3, 1) h=2 height= (0, 2, 4) h=2 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 3 sends token to node 1 (1,2) (4,2) TOKEN(2) CS (4,2)
28
3 height=(0, -2, 3) h=1 1 0 2 4 height=(0, -3, 1) h=2 height= (0, 2, 4) h=2 height= (0, 1, 2) h=0 height= (0, 0, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 1 enters the CS TOKEN(0) CS (4,2)
29
3 height=(0, -2, 3) h=1 1 0 2 4 height=(0, -3, 1) h=2 height= (0, -6, 4) h=2 height= (0, -5, 2) h=0 height= (0, -4, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 1 sends token to nodes 0, 2, 4 TOKEN(0) CS (4,2)
30
3 height=(0, -2, 3) h=0 1 0 2 4 height=(0, -3, 1) h=2 height= (0, -6, 4) h=2 height= (0, -5, 2) h=0 height= (0, -4, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 3 leaves the CS Node 3 sends release msg to node 4 TOKEN(1) CS (4,2)
31
3 height=(0, -2, 3) h=0 1 0 2 4 height=(0, -3, 1) h=0 height= (0, -6, 4) h=2 height= (0, -5, 2) h=0 height= (0, -4, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 1 leaves the CS Node 1 sends release msg to node 4 via node 2 TOKEN(3) (4,2)
32
3 height=(0, -2, 3) h=0 1 0 2 4 height=(0, -3, 1) h=0 height= (0, -6, 4) h=2 height= (0, -5, 2) h=0 height= (0, -4, 0) h=0 next varibale direct link (from higher height to lower height) k=3 Q:Q: Q:Q: Q:Q: Q:Q: Q:Q: Node 2 enters the CS TOKEN(1) CS
33
33 (cont. 1) 3 (0, 2, 3) h=0 1 0 2 4 1 (0, 1, 1) h=1 (0, 2, 4) h=0 (0, 1, 2) h=0 1 (0, 0, 0) h=0 k=3 TOKEN(3)
34
34 (cont. 2) 3 (0, 2, 3) h=0 1 0 2 4 1 (0, 1, 1) h=1 4 (0, 2, 4) h=1 4 (0, 1, 2) h=0 1212 (0, 0, 0) h=0 k=3 TOKEN(3)
35
35 (cont. 3) 3 3 (0, 2, 3) h=2 1 0 2 4 1313 (0, 1, 1) h=1 4 (0, 2, 4) h=1 4 (0, 1, 2) h=0 1212 (0, 0, 0) h=0 k=3 TOKEN(3)
36
36 (cont. 4) 3 (0, 2, 3) h=2 1 0 2 1313 (0, 1, 1) h=1 4 (0, 2, 4) h=1 4 (0, 1, 2) h=0 1212 (0, 0, 0) h=0 k=3 TOKEN(3) 4 3
37
37 (cont. 5) 3 3434 (0, 2, 3) h=2 1 0 2 1313 (0, 1, 1) h=1 4 (0, 2, 4) h=1 4 (0, 1, 2) h=0 1212 (0, 0, 0) h=0 k=3 TOKEN(3) 4 =
38
38 (cont. 6) 3 3434 (0, 2, 3) h=2 1 0 2 1313 (0, 1, 1) h=1 4 (0, 2, 4) h=1 (0, 1, 2) h=0 1212 (0, 0, 0) h=0 k=3 TOKEN(3) 4
39
39 (cont. 7) 3 3434 (0, 2, 3) h=2 1 0 2 130130 (0, -1, 1) h=1 4 (0, 2, 4) h=1 (0, 1, 2) h=0 1212 (0, 0, 0) h=0 k=3 TOKEN(3) 4 =
40
40 (cont. 8) 3 3434 (0, 2, 3) h=2 1 0 2 130130 (0, -1, 1) h=1 4 (0, 2, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(3) 4
41
41 (cont. 9) 3 3434 (0, 2, 3) h=2 1 0 2 3030 (0, -1, 1) h=1 4 (0, 2, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(2) 4 CS
42
42 (cont. 10) 3 341341 (0, -2, 3) h=2 1 0 2 3030 (0, -1, 1) h=1 4 (0, 2, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(2) 4 CS =
43
43 (cont. 11) 3 341341 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=1 4 (0, 2, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(2) 4 CS
44
44 (cont. 12) 3 4141 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=1 4 (0, 2, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(0) 4 CS
45
45 (cont. 13) 3 1 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=1 4343 (0, -3, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(0) 4 CS node 4 can’t enter CS since h(=1) > k (=0)
46
46 (cont. 14) 3 1 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=0 4343 (0, -3, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(0) 4 CS RELEASE(1)
47
47 (cont. 15) 3 1 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=0 4343 (0, -3, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(0) 4 CS RELEASE(1)
48
48 (cont. 16) 3 1 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=0 4343 (0, -3, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(1) 4 CS RELEASE(1) node 4 can enter CS since h(=1) k (=1)
49
49 (cont. 17) 3 1 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=0 4343 (0, -3, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(0) 4 CS =
50
50 (cont. 18) 3 1 (0, -2, 3) h=2 1 0 2 0 (0, -1, 1) h=0 3 (0, -3, 4) h=1 (0, 1, 2) h=0 2 (0, 0, 0) h=0 k=3 TOKEN(0) 4 CS
51
51 Concluding Remarks Initially, there is a token holder node i with height=(0, 0, i). All nodes will eventually form a token-oriented DAG. The algorithm is sensitive to link forming and link breaking. If h is always chosen to be 1 k-Mutual Exclusion If h and k are both chosen to be 1 Mutual Exclusion
52
52 Concluding Remarks (cont.) Restrictions No node failure is allowed (It can be loosed to be that the token holder and nodes in CS cannot fail.) The field of height may be unbounded (the breaking and forming of links may help readjust the height value). No partition is allowed.
53
53 Concluding Remarks (cont.) Future Work Compare to the Mutual Exclusion Algorithm [Walter et. al. 1998] and the k-Mutual Exclusion Algorithm [Walter et. al. 2001]. Develop prioritized h-out of-k mutual exclusion algorithm. Make use of the concept of self-stabilizing.
54
54 The End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.