A Software Architecture for Shared Resource Management in Mobile Ad hoc Networks Orhan Dagdeviren and Kayhan Erciyes Izmir Institute of Technology Computer Eng. Dept., Urla, Izmir 35340, Turkey {orhandagdeviren, kayhanerciyes }@iyte.edu.tr Abstract. We provide the implementation results of the distributed mutual exclusion algorithm based on Ricart-Agrawala algorithm for mo- bile ad hoc networks (MANETs) using the ns2 simulator described in [2]. The MANET consists of a ring of clusters and it is partitioned into a number of clusters periodically using the MCA [11]. Each cluster is rep- resented by a coordinator. We also show a new algorithm to construct a directed ring architecture across coordinators to be able to implement the distributed mutual exclusion algorithm. Coordinators implement var- ious distributed mutual exclusion algorithms on behalf of any member in the cluster they represent. We show experimentally that the protocol designed is scalable and that it provides an order of decrease in message and time complexities when compared with other algorithms. 1 Introduction Mobile ad hoc networks do not have fixed infrastructure and consist of mobile wireless nodes that have temporary interconnections to communicate over packet radios. Clustering, that is, partitioning of the mobile network graph into smaller subgraphs, can be used to solve various problems such as routing and mutual exclusion in such networks. In general, distributed mutual exclusion algorithms may be classified as permission based or token based. In the first case, a node would enter a critical section after receiving permission from all of the nodes in its set for the critical section. For token-based algorithms however, processes are on a logical ring and possession of a system-wide unique token would provide the right to enter a critical section. Susuki-Kasami’s algorithm [8] (N messages) and Raymond’s tree based algorithm [5] (log(N) messages) are examples of token based mutual exclusion algorithms. Examples of nontoken-based distributed mu- tual exclusion algorithms are Lamport’s algorithm [3] (3(N-1) messages), Ricart- Agrawala (RA) algorithm (2(N-1) messages) [6] and Maekawa’s algorithm [4]. Safety, liveness and fairness are the main requirements for any mutual exclu- sion algorithm. Lamport’s algorithm and RA algorithm are considered as one of the only fair distributed mutual exclusion algorithms in literature. Distributed mutual exclusion in mobile networks is a relatively new research area. A fault tolerant distributed mutual exclusion algorithm using tokens is discussed in [9]