A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
Abdelouahid DERHAB & Nadjib BADACHE LSI-TR-0204
Février 2004
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks Abdelouahid DERHAB1
Nadjib BADACHE2
1
LLB, CERIST, 3 Rue des frères Aissou, Ben Aknoun, BP 143 Alger, 16030 Algérie Email:
[email protected] 2
LSI-Département Informatique, Faculté Génie Electronique & Informatique, USTHB El Alia BP n°32, Bab Ezzouar, Alger, Algérie. Email:
[email protected]
Abstract. A Mobile Ad hoc NETwork (MANET) is a collection of wireless mobile nodes forming a temporary network without the use of any existing infrastructure or centralized administration. Due to the dynamic topology of the network and the resource constraints, implementing distributed algorithms in MANETs is a challenging task. This paper proposes a new architecture to solve the problem of mutual exclusion for MANETs. The architecture is structured into two layers: (i) a service layer that contains a distributed mutual exclusion algorithm and (ii) a network layer that includes two routing protocols. The routing protocols are chosen in order to reduce the number of hops traversed and the number of application messages exchanged per Critical Section (CS) access. The experimental results show the effectiveness of our architecture, especially when the mobility increases. Key-Words. Ad Hoc mobile networks, distributed mutual exclusion algorithm, routing protocols, Direct Acyclic Graph.
1.
Introduction
Ad hoc mobile networks are dynamically formed by a set of mobile nodes connected by wireless links, without any predefined infrastructure or centralized administration. They are used in different applications such as: emergency search and rescue operations, communication between soldiers in a battlefield, sharing information in a conference and data acquisition operations in inhospitable terrains. In such networks, a pair of nodes communicates by sending messages either over a direct wireless link, or over a sequence of wireless links including one or more intermediate nodes. A wireless link is established only if two nodes are within a certain transmission radius called power range. Ad Hoc mobile networks are characterized by a dynamic topology and limited resources, which impose new requirements to design distributed algorithms for such environment. Synchronizing accesses to shared resources is one of the fundamental problem in distributed systems. To address this problem, many Distributed Mutual Exclusion Algorithms (DMEAs) have been proposed. The proposed DMEAs are divided into two categories: permission based [5, 7, 12] and token based [8, 11, 13, 14, 15]. In the permission based algorithms, a node enters the critical section (CS) only after receiving a permission from a set of nodes. The token based algorithms give the node holding the token the right to enter the CS. In recent years, several DMEAs designed for Ad Hoc networks [2, 3, 17, 16] have been proposed. The permission based algorithms require a great number of messages exchange, which make them unsuitable for an Ad Hoc network characterized by its limited resources. The algorithm presented in this paper belongs to the token based category. It runs on top of the network layer. This latter uses a multi-routing architecture, in which request messages and the token message are routed by different routing protocols in order to reduce the number of hops and the number of application messages exchanged per CS. The rest of the paper is organized as follows: Basic ideas of the proposed architecture and the algorithm are presented in Section 2. In section 3, we present our system architecture and assumptions. The detailed 2
LSI-TR-0204
description of the DMEA is given in Section 4. In Section 5, we provide a proof of correctness. The analysis of complexity is presented in Section6, Section 7 presents the results of the simulation study. Finally, conclusion is presented in Section 8.
2.
Basic Idea
In the token-based DMEAs, two types of messages are exchanged: request messages and token messages. Request messages are sent to the token holding node (privileged node) and the token message is sent to one of the requesting nodes. In order to send a request message toward the privileged node, many DMEAs such as [17] use a Direct Acyclic Graph (DAG) in which for every node i, there exists a direct path originating at i and terminating at the privileged node. In the case of the DAG structure: (1) A requesting node and any node that receives a request message need only to know the next hop toward the privileged node. (2) The construction and the maintaining of the DAG incur low overhead. However, one of the drawbacks of this solution is: if the path used to route the request message is [A1,…, An], then the token message must be routed along [An,…, A1], which is a heavy and costly task in an Ad hoc network characterized by its dynamic topology. The privileged node has to determine among m requesting nodes the node that will be its successor. This task is achieved by defining a total order on these m nodes. This order is chosen according to a certain policy P such as: fifo policy or P is chosen to adapt to topology changes such as: the optimal route between a requesting node and the privileged node,…etc. In this case, the total order can be obtained by using the underlying routing protocol as in [2]. As mentioned above, we can notice that request messages and token messages need to be handled by different routing protocols in order to (i) transmit these messages along optimal routes and to (ii) generate low routing overhead when the network topology changes. Therefore, a network layer containing different routing protocols can be a solution for this problem. Our DMEA exploits the idea of multirouting protocols by using: (i) TORA routing protocol, [9] that generates a DAG on the network to route request messages, and (ii) a reactive routing protocol similar to [10] to route the token message in which a route discovery procedure is executed to choose among m requesting nodes the next privileged node. At the network layer, we can distinguish between a request message and a token message by using the TOS and the Traffic Class field in respectively IPv4 and IPv6 packet header.
3.
System Model and Assumptions
Fig. 1. System Architecture 3
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
The system is modelled as a set of n mobile hosts, communicating over wireless links. The network has the following assumptions: 1. Communication links are bidirectional and FIFO. 2. Each node has a unique node identifier. 3. The network is reliable, there is no message loss nor node crash. 4. Each node is aware of its direct neighbors. 5. A node does not stay in CS for ever. 6. The network is not subject to permanent partitions. The architecture has to fulfil two requirements: 1. Each node in the network is able to execute the two routing protocols previously mentioned (i.e., TORA and a reactive routing protocol). 2. Only the nodes which want to enter the CS and the token holding node need to execute the mutual exclusion process. This architecture has the followings advantages: 1. The mutual exclusion algorithm is executed only by the nodes which concurrently compete for the critical section as well as the privileged node. Messages between the requesting node and the privileged node can be forwarded by any intermediate node that has not the mutual exclusion process under execution. 2. The routing protocols are chosen so as to reduce the number of routing hops needed to send the request and the token messages. 3. The mutual exclusion process has not to specify the destination of its request messages; this task is achieved by the routing protocols TORA. The interaction between layers is depicted in Figure 1 and the DMEA is modelled by the Mutual exclusion process. The messages exchanged between layers are: RequestCSi/ReleaseCSi: The application process requests/releases access to the CS. EnterCSi: The mutual exclusion process informs its application process that it can enter the CS. Request/token: The mutual exclusion process exchanges a request/token message with the network layer. Find: The reactive routing protocol broadcasts this message to discover a set of nodes. LinkUpi/LinkDowni: The node receives a notification that a link is now up/down.
4.
The Mutual Exclusion Algorithm
In this section we first present the components of the token message and the order policy applied on the requests issued by the node, then, we give the local data structure at each node and a general overview of the algorithm. A pseudo-code for the algorithm can be found in the appendix. 4.1
The token message structure and request order policy
One of the most issues that we face in the mutual exclusion algorithm is how to order the requests. If we employ the fifo order, the drawback that appears is when the next privileged node that should receive the token does not in the same partition as the token holding node, hence no request will be satisfied until the two partitions merge. If we employ another policy such as: the closest node in terms of number of hops will be satisfied first. In this case, a starvation situation can appears. To overcome these problems, we suppose in this algorithm that there exists one token message that circulates in the network. It carries a queue Q that contains all the nodes’id that request access to the CS. This queue is composed of subsets Bagk, such that: k ∈ N is the sequence number of the Bagk. This latter contains all the nodes that are received by the same privileged node during the same period. The queue Q has to fulfill the following rules: rule 1: The subsets Bagk are ordered according to fifo policy. rule 2: within Bagk, nodes are ordered according to the closest node in terms of number of hops. rule 3: If all the nodes of Bagk reside in other partitions, then these nodes will be transferred to Bagk+1. 4
LSI-TR-0204
From rule 1 and rule 2, we can notice that the two policies (fifo, the closet node) are used. This compound policy implies that no node belonging to Bagk+1 will enter its CS, until all nodes of Bagk enter their CS, and rule 3 avoids to suspend the execution of the mutual exclusion process when none of the nodes of Bagk resides in privileged node’s partition. 4.2
Data Structure at each node
At the mutual exclusion layer Requestingi: Boolean variable set to TRUE when the application process wants to enter the CS. tokenHolderi: Boolean variable set to TRUE when the application process receives the token message. At the routing protocol TORA myHeighti: A 5-tuple (τi , oidi , ri , δi , i) representing the height of node i as described in [9]. nexti: Node on an outgoing link. Ni: i’s neighbors. At the reactive routing protocol it contains the following fileds: source, nextToken, nextHop that correspond to the source, destination and the next hop of the route toward the next privileged node.
Fig.2. An example of executing the algorithm 4.3
Overview of the algorithm
4.3.1 Initialization Procedure Initially, a specific node that holds the token initiates the creation of the DAG as explained in [9]. At the end of the procedure, all the nodes have at least a path toward the token holding node. Figure 2(a) provides an example where the node F creates the DAG and hence becomes the privileged node. 4.3.2 Request message circulation When an application process at node i wants to enter its CS, it sends a RequestCSi message to the mutual exclusion process. This later set Requestingi to TRUE; if node i holds the token, it sends EnterCSi message to the application process. If node i, does not hold the token, TORA protocol sends to the neighbor designed by nexti a request message. The request message will be forwarded by the intermediate nodes until it reaches the privileged node. The identifier of the requesting node will be inserted in the set Bagmax of the queue Q, if the privileged node has already received requests. Otherwise, i will be inserted in the Bagmax+1. Figure 2(b) provides an example where the requests of nodes D, C and G arrive at the privileged node F. 5
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
4.3.3 Token message circulation When the privileged node leaves its critical section and the queue of the token message is not empty, it checks if there is neighbors among the nodes belonging to Bagmin, then it sends the token message to the neighbor that has the minimum height. Otherwise, it broadcast in the network a Find(Bagmin) packet. The aim of this broadcast is to find a node from Bagmin that has the shortest path to the privileged node. If the privileged node does not receive a Reply message after a specific period of time, it puts all the nodes of Bagmin in Bagmin+1 set, and broadcasts in the network a Find (Bagmin+1) packet. At the network layer, when a node i receives the token, it updates its myHeighti as follows: (τi ,oidi ,ri )= min { (τj ,oidj ,rj ) | j ∈ Ni} δi=min {δi, | j ∈ Ni with (τj ,oidj ,rj )= (τi ,oidi ,ri )}-1 and sends its new height to its outgoing neighbors. If i has already requested access to the CS, it passes the token to the upper layer and waits for a ReleaseCSi message. In the other case, it sends the token to the next privileged node. At the mutual exclusion layer, the node i removes its identifier from the queue of the token. In Fig. 2(c), a privileged node sends a message Find({D,C,G}) and waits for the Reply message, where the set {D;C;G} denotes Bag1. F receives three different paths: path1=[F,H,G] path2=[F,E,B,D] and path3=[F,E,B,A,C]. The privileged node chooses path1 that has the minimum number of hops. Figure 2(d) depicts the circulation of the token through the nodes of Bag1. 4.3.4 Reaction to topology changes The reaction to topology changes is carried out by the routing protocols. When a node i detects the failure of a link to a neighbor node j, TORA removes j from Ni. Then, if node i is not the privileged node and it has no outgoing link, it updates its height as explained in [9], then it sends its new height to its outgoing neighbors. In the case where the node i detects a new link to node j, i sends its height to j. Figures 2(e) and 2(f) show the reaction of the algorithm when a partition occurs. In this case the privileged node H can not locate B, it concludes that B belongs to another partition, then it puts B in Bagmin+1 (i.e., Bag3), the token will be sent to E. This latter sends Message Find ( {B} ). If Q contains only unreachable nodes, E will repeat sending the message Find until the merging of two or many partitions occurs.
5
Correctness of the algorithm
In this Section we prove that the algorithm given in the appendix ensures the mutual exclusion (safety property) and it is starvation free (liveness property). Theorem 1: At any time, at most one node can be in its CS. Proof: We will prove that at any time, at most one node can be in its CS, which means that at any time, at most one node fulfils the following condition: Requestingi=TRUE and tokenHolderi=TRUE. Initially, one node called k holds the token (Algorithm 3, Procedure Init), it sets Requestingi to FALSE and tokenHolderk to TRUE (There is no node in the CS). Each application process at node i that wants to enter the CS, sends RequestCSi to the mutual exclusion process. This latter, sets Requestingi to TRUE. Then one of two cases will occur: • if node i holds the token (tokenHolderi=TRUE): it sends EnterCSi to the application process (i.e., one node which is i is in the CS). (Algorithm 3, case A, ligne 3). • if node i does not hold the token, it sends a request message to the network layer in order to be routed toward the privileged node. (Algorithm 3, case A, ligne 5). When the privileged node releases the CS or it does not want to enter the CS (i.e., tokenHolderi = TRUE and Requestingi=FALSE). In this case, one node called j can enter the CS. We discuss below four cases separately : • case 1: When node i receives the request message from j and the the queue Q of the token is empty. (Algorithm 3, case D, ligne 1-6).
6
LSI-TR-0204
• case 2: When node i releases the CS and there is one node’s identifier called j in the queue Q of the token. (Algorithm 3, case B, ligne 3-6). • case 3: When node i releases the CS and the queue Q contains one of the node in Ni (i.e., j). (Algorithm 3, case B, ligne 6-9). • case 4: After node i has sent Find(Bagk), it receives a Reply before a timeout from a node j=nextToken which is the next privileged node. (Algorithm 3, case E, ligne 1-3). In each of the four cases mentioned above, we have Requestingj =TRUE. After, for each case, the node i sets tokenHolderi to FALSE and sends the token to j. The node j sets tokenHolderj to TRUE and sends EnterCSj to its application process (Algorithm 3, case D), which means that only the node j is in its CS, thus at any time, at most on node is in its CS. Lemma 1: Any request message will be delivered to the token holding node. Proof: In the case of a static network (i.e., there is no mobility), the request message will be sent along the direct links of the DAG until it reaches the privileged node. If the request crosses the network during token movement, the DAG structure will be stabilized after the token reaches its destination. Then a request message can finally arrive at the token holding node. In the case of mobility, when a link between two nodes (i and j ) is failed, the routing protocol TORA at i, either updates its variable nexti or executes a partial reversal link procedure in order to maintain a directed path toward the token holding node. If a network partitioning occurs and the request message is in the portion that does not contains the token, then a request message will be resending when the requesting node ‘s partition merges with the partition that contains the token and a direct path is established between the requesting node and the token holding node. Lemma 2: The token holding node delivers the token message to its successor in finite time. Proof: In the case of a static network, when the token holding node releases its critical section, it uses the reactive routing protocol that broadcasts the Find (Bagmin) to choose the successor node that will receive the token (Algorithm 2). In the case of mobility, The requesting node executes the route discovery procedure if there is no route toward the privileged node. After the broadcast of Find (Bagmin) packet, if there is no response after a certain period of time, it means that the nodes of Bagmin belong to other partitions. These nodes will be inserted in Bagmin+1 (Algorithm 3, case E, ligne 5). Assuming that the reactive routing protocol is efficient and the partitioning is temporary, the token will be delivered to the next token holding node in finite time. Theorem 2: Any node requesting the critical section, will get access to it in finite time. Proof: By lemma 1, any request message will reach the token holding node. The identifier of the requesting node will be inserted in the queue of the token message. This queue is composed of Bagk sets ordered according to a FIFO policy. Within each Bagk, the nodes are ordered according to a certain policy based on the distance between each node in Bagk and the token holding node. This policy implies that there is no node belonging to Bagk+1 will enter its CS, until that all nodes of Bagk enter their CS. As the time of staying in the CS is finite and the token message reaches the desired node in finite time (by lemma 2), we can prove that each node requesting the critical section, will get access to it in finite time.
6. Analysis of Complexity We analyze the performance of the proposed algorithm by calculating four metrics: Message complexity: The number of application messages exchanged per CS entry. Routing message complexity: The number of routing control packets required to execute the CS. Synchronization delay: The time between two successive accesses. It is expressed in terms of the maximum number of sequential message after a node, say i, leaves the CS and before another node, say j, can enter the CS. Control information Complexity: It is the size of control information piggybacked on each message. The complexity parameters we use are: n (the number of nodes in the network), m (the number of requester nodes in the system), D (The longest path in the network), |Bag| (The average number of nodes in the set Bag of the queue). 7
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
Message complexity This mutual exclusion algorithm needs two application messages per critical section entry (i.e., a request message and a token message). Routing message complexity When a node wants to enter CS, it sends a request message which requires O(D) hops. For each set Bagk, the token holding node broadcast a Find(Bagk) in the network and waits for a Reply message. This operation costs in the worst case O(N+D) messages. When a route to one of the nodes of Bagk is established. The token message circulates through this route. It requires in the worst case O(D) hops. The total number of routing message generated to execute a CS entry is O(2×D + N) messages. Under high load: each node sends a request message that takes O(D) hops and each token holding node transmits the token to one of its neighbors that has requested the access to the CS. Therefore, each CS entry needs O(D+1) routing message. Synchronization delay Under low load: The token message need in the worst case O(D) hops to arrive at the next token holding node. Under high load: Each node transmits the token to its neighbor, which requires only one hop. Control information Complexity In this algorithm, the information attached to the token is the queue that contains m node. The size of this queue is O(m × log2 n) bits.
7.
Simulation Results
In this section, we discuss the performance of our algorithm compared to the RL [17] and Baldoni(BV) [2] algorithms by using GloMoSim simulator [18]. In our experimental results, each plotted point represents the average of five executions. The simulation environment is characterized by 25 nodes moving in the area of 750m × 750m, with random initial nodes’ location, a random waypoint mobility model [4] and with period of staying in the CS equal to 1 second. In this paper we present two comparison parameters: 1) Mobility factor(Mob): We used the definition of mobility presented in [6]. This latter is based on relative nodes’ movement. It expresses better network topology changes. Mobility is a function of both a speed and movement pattern, it is represented by a new parameter called mobility factor (Mob). It is computed during the simulation, with certain rate ∆t. Mobility factor is given by the following formula : n
Mob= ∑ M i i =1 n T − ∆t
Mx= ∑ t =0
Ax (t)− Ax (t + ∆t) T n
Ax(t)=
dist(nx,ni ) n−1 i =1
∑
where : dist(nx; ny): Distance between node x and node y. n : Number of nodes . Ax(t): Average distance between node x and all the others nodes, at time t. Mx: Average relative mobility of node x, regarding all other nodes, during simulation time. T : Simulation time. ∆t : Time period used in calculation. We calculate Ax(t) after each ∆t. For our simulation, we have added to GloMoSim the mobility factor computation as well as another parameter (INTERVALTIME) that corresponds to ∆t. To validate the choice of mobility parameter, we have added the average number of link changes computation during the simulation, a change may be 8
LSI-TR-0204
either a new link creation or a link failure. we define the average link changes computation (LINK CHANG) by the following formula : T LINK_ CHANG= ∑link _ change(t)× ∆t T t = ∆t Link_change(t) =
n −1
n
∑∑[state(t,i, j)⊕state(t −∆t,i, j)] i = 0 j = i +1
1 if i is linked with j at time t state(t ,i ,j) = 0 otherwise In [1], we have shown that the average number of link changes is proportional to Mobility factor. We simulate four levels of mobility: static (Mob=0), low (Mob=1), medium (Mob=5), and high (Mob=10). 2) Request load: Nodes issue requests randomly, using Poisson distribution with mean λ, which represents the number of requests/sec generated by a single node. Thus the time between when a node leaves the CS and makes its next request to enter the CS is an exponential random variable with mean 1 .
(λ )
We evaluate the algorithms based on five metrics: (i) Total number of critical section access (TotalCSAccessNumber), (ii) the average number of messages per CS entry (AvgMsgPerCS), (iii) Average number of hops per CS entry(AvgHopP erCS) , (iv) Routing message overhead and (v) Average Waiting Time per CS (AvgTimePerCS). As seen in Figure 3, the number of CS access decreases when the mobility is increased. RL has the best results. In the case of our algorithm, the source routing protocol executes a route discovery mechanism in order to find the next privileged node. The execution of this mechanism increases the synchronization delay and therefore reduces the number of CS access. In BV algorithm, the token message circulates through all the nodes of the network, which increases the waiting time and reduces the number of CS access. Figure 4 shows that our algorithm has the best performance in terms of number of messages per CS. It is fairly constant at value 2 unless when the mobility is high. BV performs best when request load is increased, the token message circulates through a logical round composed of (n-1) nodes to satisfy a few number of requesting nodes. Whereas in the case of high load (10-1 ), the number of CS access increases (each node in the network is waiting for the token message almost all the time), which leads to the decrease of the average number of messages per CS entry. As for RL, it shows good results in the case of static networks and low mobility, Whereas in the case of medium mobility and high mobility, the average number of messages per CS entry increases as the mobility increases. The reason for this is that the number of partitions increases and in this case, the logical structure used by the algorithm can not detect the partitioning of the network, which implies that the token and the request messages circulate continually in the network. As seen in Figure 5, our algorithm has in many cases the best results. This is due to the fact that the policy employed chooses the closest node in terms of number of hops between the privileged node and all the nodes belonging to the Bagk set. Our algorithm is slightly influenced by the variation of mobility because its routing protocol TORA uses a logical structure that can detect a partitioning of the network, which implies that request messages and the token message will not continually circulate in the network to reach the privileged or the next privileged node. In the case of RL algorithm, its average number of hops per CS entry is the same as the average number of messages per CS entry because each CS message takes one hop. As the mobility increases, request messages are resent many times and they continually circulate in the partition that does not contain the token. The average number of hops per CS entry in BV decreases when the load is increased for the same reasons cited in the analysis of figure 3.
9
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
In Figure 6, The proactive routing protocol associated to BV algorithm generates a constant number of routing overhead. In the case of our algorithm, the number of routing overhead increases as the request load increases. The reason for this, is that each time a privileged node wants to forward the token message to the next privileged node, it executes a route discovery mechanism that consumes a great number of routing control messages but their size are less than those of BV algorithm. In the case of RL, the number of routing overhead increases when the request load increases, because each time a node receives the token message it updates its height in the DAG and send to all its neighbors its new height. We remark that the number of routing overhead in RL algorithm and our algorithm are not affected by the variation of the mobility but by the number of critical section access and the variation of the request load. In Figure 7, we remark that the average waiting time per CS entry increases when the request load is increased. This is due the increasing of number of nodes that are in waiting to access the critical section. In the case of static topology, The average waiting time in our algorithm is higher than those of BV and RL algorithm. The reason for this, is that in the case of our algorithm, when a privileged node releases its CS and does not find a path to the next privileged node, it executes a route discovery procedure that take a period of time in order to find this node. When the topology is dynamic, the average waiting time does not depend much on the mobility but on the number of critical section access. RL has the highest values in the case of dynamic topology. The reason for this is that in this situation, the number of request removed from nodes’ queue increases, which imply that RL resend its request. Therefore, the average waiting time is increased.
Fig.3. Total number of critical section access
10
LSI-TR-0204
Fig.4. Average number of messages per CS
Fig.5. Average number of hops per CS 11
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
Fig.6. Routing message overhead
Fig.7. Average Waiting Time per CS 12
LSI-TR-0204
8
Conclusion
This paper presents a architecture to solve the problem of mutual exclusion in MANETs. This architecture includes a mutual exclusion service and two routing protocols, in which the network and the mutual exclusion layers cooperate to reduce the consumption of resources when the critical section is executed. The proposed token based distributed mutual exclusion algorithm does not use any logical structure but it relies on the network layer that supports at least two routing protocols. Each type of message is routed by a specific routing protocol in order to achieve an optimal number of hops and reduce the effects of this algorithm on the performance of the routing protocols. However, this architecture supposes that the network layer supports many routing protocols, which is costly in terms of storage space. To show the effectiveness of our algorithm, we have compared this algorithm to RL[17] and BV[2] algorithms with respect to different values of mobility and load. Simulation results has shown that our algorithm has exhibited good performances in many situations. It provides better number of messages and number of hops per CS access than RL and BV. In the other hand, the number of routing packets and the average waiting time per CS are high when the mobility is low and converges to good values when the mobility increases.
References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]
N. Badache, D. Djenouri, and A. Derhab. Mobility impact on mobile ad hoc routing protocols. In ACS/IEEE International Conference on Computer System and Applications (AICCSA’03). Tunis, Tunisia, July 2003. R. Baldoni, A. Virgillito, and R. Petrassi. A distributed mutual exclusion algorithm for mobile ad-hoc networks. In Proc of the 7th IEEE Symposium on Computer and Communications (ISCC 2002), pages 539–545, Toarmun, Italy, July 2002. Y. Chen and J. L. Welch. Self-stabilizing mutual exclusion using tokens in mobile ad hoc networks. In the 6th Annual International Workshop on Discrete Algorithms and Methods for Mobile Computing and Communications (DIALM’2002), 2002. David B Johnson and David A Maltz. Dynamic source routing in ad hoc wireless networks. In Imielinski and Korth, editors, Mobile Computing, volume 353. Kluwer Academic Publishers, 1996. L. Lamport. Time, clocks and the ordering events in a distributed system. Communication of the ACM, 21(7):558– 565, July 1978. T. Larsson and N. Hedman. Routing protocols in wireless ad hoc net-works -a simulation study. Master’s thesis, Lulea University of Technology, Stockholm, 1998. M. Maekawa. A pn algorithm for mutual exclusion decentralized systems. ACM Transactions on Computer Systems, 3(2):145–159, May 1985. M.L. Neilson and M. Mizumo. A dag-based algorithm for distributed mutual exclusion. In Proc of Intl Conf on Dist Comp Systems, pages 354–360, 1991. V. D. Park and M. S. Corson. A highly adaptive distributed routing algorithm for mobile wireless networks. In Proc INFOCOM 97, pages 1405–1413, April 1997. C. E. Perkins and E. M.Royer. Ad hoc on demand distance vector (aodv) algorithm. In Systems and Applications (WMCSA’99 ), pages 90–100, 1999. K. Raymond. A tree based algorithm for distributed mutual exclusion. ACM Transactions on Computer Systems, (1):61–77, February 1989. G. Ricart and A.K. Agrawala. An optimal algorithm for mutual exclusion in computer network. Communication of the ACM, 24(1):9–17, January 1981. M. Singhal. A heuristically-aided algorithm for mutual exclusion in distributed systems. IEEE Trans on Computer Systems, 38(5):651–662, 1989. M. Singhal and D. Manivannan. An efficient fault tolerant mutual exclusion algorithm for distributed systems. In Proc of the ISCA Intl Conf on Parallel and Distributed Computing Systrems, pages 525–530, October 1994. I. Suzuki and T. Kasami. A distributed mutual exclusion algorithm. Transactions on Computer Systems, 3(4):344–349, November 1985. J. Walter, G. Cao, and M. Mohanty. A k-mutual exclusion algorithm for wireless ad hoc networks. In Proc of the first annual Workshop on Principles of Mobile Computing (POMC 2001), Newport, Rhode Island USA, August 2001. J. Walter, J. Welch, and N. Vaidya. A mutual exclusion algorithm for ad hoc mobile networks. In Dial M for Mobility workshop, Dallas, TX, USA, October 1998. Xiang Zeng, Rajive Bagrodia, and Mario Gerla. Glomosim: A library for parallel simulation of large-scale wireless networks. In Workshop on Parallel and Distributed Simulation, pages 154–161, 1998.
13
A Distributed Mutual Exclusion Algorithm over Multi-routing Protocols for Mobile Ad Hoc Networks
Appendix Mutual exclusion algorithm at node i Bagmin/Bagmax: Minimum/maximum sequence number of Bag. Insert(Bagk , j): Insert j in the Bagk of Q. MaxSN(): Function, returns the maximum sequence number in Q. Algorithm 1 Application process (AP) 1: Begin 2: 3: Send RequestCSi to MEP; 4: Wait for EnterCSi; 5: 6: Send ReleaseCSi to MEP; 7: End.
Algorithm 2 Network Layer (NL) When Find TokenHolder(Bagk ) is received from MEP 1: Broadcast Find(Bagk ) and notify MEP layer when a Reply is received from nextToken; When Request(j) is received From MEP 1: Send Request(j) to nexti; ( TORA routes the request message toward the next privileged node )
Algorithm 3 Mutual exclusion Process (MEP) Procedure Init() 1: Requestingi:= FALSE; 2: tokenHolderi:= FALSE; 3: if i =initial token holding node then 4: tokenHolderi:= TRUE; 5: token.Q:= ∅ ; 6: Initiate the creation of the DAG; 7: end if Case A: When RequestCSi is received from AP 1: Requestingi:=TRUE; 2: if tokenHolderi= TRUE then 3: Send EnterCSi to AP; 4: else 5: Send Request(i) to NL; 6: end if Case B: When ReleaseCSi is received from AP 1: Requestingi:= FALSE; 2: if token.Q ≠∅ then 3: if token.Q ={ j } then 4: tokenHolderi:=FALSE; 5: send token to j; 6: else if token.Q.Bagmin ∩ Ni ≠∅ then 7: select a neighbor k that has the minimum high; 8: tokenHolderi:=FALSE; 9: send token to k; 10: else 11: Send Find TokenHolder(Bagmin) to NL and wait for a Reply; 12: end if
14
LSI-TR-0204
13: end if Case C: When token is received From NL 1: token.Q:=token.Q – { i} ; 2: tokenHolderi:=TRUE; 3: Send EnterCSi to the AP; Case D: When Request(j) is received From NL 1: if token.Q=∅ then 2: Insert(token.Q.Bag1, j); 3: if Requestingi= FALSE then 4: tokenHolderi:=FALSE; 5: Send token to j; 6: end if 7: else if j is the first request arrives at I then 8: K:=MaxSN()+1; 9: Insert(token.Q.Bagk , j); 10: else 11: Insert(token.Q.Bagmax, j); 12: end if Case E: 1: if Reply is received from nextToken before Timeout then 2: tokenHolderi:=FALSE; 3: send token to nextToken; 4: else 5: transfer all the element of Bagmin to Bagmin+1 6: end if
15