Removing the memory limitations of sensor networks with flash-based virtual memory

Virtual memory has been successfully used in different domains to extend the amount of memory available to applications. We have adapted this mechanism to sensor networks, where, traditionally, RAM is a severely constrained resource. In this paper we show that the overhead of virtual memory can be significantly reduced with compile-time optimizations to make it usable in practice, even with the resource limitations present in sensor networks. Our approach, ViMem, creates an efficient memory layout based on variable access traces obtained from simulation tools. This layout is optimized to the memory access patterns of the application and to the specific properties of the sensor network hardware. Our implementation is based on TinyOS. It includes a pre-compiler for nesC code that translates virtual memory accesses into calls of ViMem's runtime component. ViMem uses flash memory as secondary storage. In order to evaluate our system we have modified nontrivial existing applications to make use of virtual memory. We show that its runtime overhead is small even for large data sizes.

[1]  Rajiv Gupta Compiler optimization of data storage , 1992 .

[2]  Sivan Toledo,et al.  Algorithms and data structures for flash memories , 2005, CSUR.

[3]  Peter J. Denning,et al.  Virtual memory , 1970, CSUR.

[4]  James W. Stamos,et al.  Static grouping of small objects to enhance performance of a paged virtual memory , 1984, TOCS.

[5]  Michael Neufeld,et al.  ELF: an efficient log-structured flash file system for micro sensor nodes , 2004, SenSys '04.

[6]  David E. Culler,et al.  Active sensor networks , 2005, NSDI.

[7]  Robert Szewczyk,et al.  System architecture directions for networked sensors , 2000, ASPLOS IX.

[8]  David E. Culler,et al.  The dynamic behavior of a data dissemination protocol for network programming at scale , 2004, SenSys '04.

[9]  Wei Hong,et al.  A macroscope in the redwoods , 2005, SenSys '05.

[10]  Adam Dunkels,et al.  Contiki - a lightweight and flexible operating system for tiny networked sensors , 2004, 29th Annual IEEE International Conference on Local Computer Networks.

[11]  K. Wehrle,et al.  Accurate prediction of power consumption in sensor networks , 2005, The Second IEEE Workshop on Embedded Networked Sensors, 2005. EmNetS-II..

[12]  Chandra Krintz,et al.  Cache-conscious data placement , 1998, ASPLOS VIII.

[13]  Stephen J. Hartley Compile-Time Program Restructuring in Multiprogrammed Virtual Memory Systems , 1988, IEEE Trans. Software Eng..

[14]  Wei Hong,et al.  The design of an acquisitional query processor for sensor networks , 2003, SIGMOD '03.

[15]  Joel Koshy,et al.  Remote incremental linking for energy-efficient reprogramming of sensor networks , 2005, Proceeedings of the Second European Workshop on Wireless Sensor Networks, 2005..

[16]  Abraham Silberschatz,et al.  Operating System Concepts , 1983 .

[17]  Mani B. Srivastava,et al.  A dynamic operating system for sensor nodes , 2005, MobiSys '05.

[18]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[19]  Lothar Thiele,et al.  Prototyping Wireless Sensor Network Applications with BTnodes , 2004, EWSN.

[20]  David E. Culler,et al.  System software techniques for low-power operation in wireless sensor networks , 2005, ICCAD-2005. IEEE/ACM International Conference on Computer-Aided Design, 2005..

[21]  Jeff Rose,et al.  MANTIS: system support for multimodAl NeTworks of in-situ sensors , 2003, WSNA '03.

[22]  Pedro José Marrón,et al.  FlexCup: A Flexible and Efficient Code Update Mechanism for Sensor Networks , 2006, EWSN.

[23]  Donald J. Hatfield,et al.  Program Restructuring for Virtual Memory , 1971, IBM Syst. J..

[24]  David E. Culler,et al.  The nesC language: A holistic approach to networked embedded systems , 2003, PLDI.

[25]  John A. Stankovic,et al.  t-kernel: providing reliable OS support to wireless sensor networks , 2006, SenSys '06.

[26]  Jens Palsberg,et al.  Avrora: scalable sensor network simulation with precise timing , 2005, IPSN 2005. Fourth International Symposium on Information Processing in Sensor Networks, 2005..

[27]  Jens Palsberg,et al.  Nonintrusive precision instrumentation of microcontroller software , 2005, LCTES '05.