Cross-layer Architecture of a Distributed OS for Ad Hoc Networks Peter Janacik and Tales Heimfarth Heinz Nixdorf Institute, University of Paderborn Fuerstenallee 11, 33102 Paderborn, Germany {pjanacik, tales}@uni-paderborn.de Abstract Despite the advances in wireless, energy-constrained ad hoc networks, there are still many challenges due to the limited capabilities of the current hardware. Therefore, our aim is to develop a lightweight, yet powerful operat- ing system (OS) for such networks. We reject the brute force method of provisioning all necessary OS services at each node of the system. Instead, in our approach, services provided by the OS organise autonomously to achieve an efficient distribution over the network. In order to enable the use of our OS in energy- and hardware-constrained net- works, we argue that it is necessary that all layers of the system are designed to cooperate within a cross-layer ap- proach. At the link layer, our contribution includes an emer- gent topology control protocol taking into account node and network properties enabling the division of roles between nodes. Further, we employ a combined link metric based on signal strength, success rate, and history to enable a more realistic link quality assessment and pheromone ad- justments in routing. At the network layer, to avoid costly reorganisation after role changes incurred by topology con- trol, we use a fuzzy distinction between nodes with different roles by adding a role-based component to the probabilis- tic next-hop selection function of ant colony routing. At the highest level of our approach, we propose a short- and a long-range migration method for OS service states, based solely on local information and autonomous decisions, to improve the overall quality of service, fairness, balance, predictability, and reduce communication overhead. In ns- 2 simulations, we demonstrate improvements of quality of service of 80 % and load balancing of 200 to 400 %. 1 Introduction Wireless ad hoc or sensor networks enable a myriad of novel applications ranging from human-embedded sensing to ocean data monitoring. Given current hardware limita- tions of wireless nodes, e.g. commercial off-the-shelf sen- sor nodes (see [12]), there are severe restrictions on the soft- ware executed on them. For the same reason, operating sys- tems (OS) for this type of nodes, like TinyOS [7], do not provide the means to handle more complex applications. To cope with these challenges, we use the paradigm of OS ser- vice distribution within our lightweight, distributed operat- ing system NanoOS, which we already introduced in [6]. The OS consists of different services such as scheduling, synchronisation, time, etc. Traditional OS use the brute force method and offer all needed services at every node of the system resulting in excessive resource waste. Moreover, this limits the possible number of OS services employed at one node at the same time. In contrast, in our approach, the needed OS services are autonomously distributed over different nodes leading to a lower per-node load, a greater amount of possible service types, and the option of load and communication overhead adjustment. In particular, our autonomous approach has the following aims: load bal- ancing, i.e. the uniform distribution of load over available nodes and services, fairness, i.e. the equal treatment of service requestors, quality of service, i.e. short answering times, predictability of service quality, and reduction of dis- tance between OS service requestors and providers. Our approach aims to achieve a global-level result with these properties, which emerges solely from numerous local in- teractions (based on local, i.e. one-hop information) trig- gered by autonomous components. We further argue that it is necessary to also tailor the lower layers to the needs of our autonomous, emergent distributed operating system. Moreover, to improve efficiency, these lower layers have to cooperate within a cross-layer approach. At the logical link control layer, our approach includes a topology control protocol, motivated by the division of labour observed in ants, which assigns roles to nodes incor- porating a node’s state and its neighbourhood’s properties. Further, a combined link metric, closely reflecting the un- derlying link characteristics facilitates a more efficient rout- ing and service distribution at upper layers. At the network layer, we propose two extensions to ant colony-based multi- path routing: (1) a means to efficiently react to role changes 0-7695-2653-5/06/$20.00 (c) 2006 IEEE