Static memory management for efficient mobile sensing applications

Memory management is a crucial aspect of mobile sensing applications that must process high-rate data streams in an energy-efficient manner. Our work is done in the context of synchronous data-flow models in which applications are implemented as a graph of components that exchange data at fixed and known rates over FIFO channels. In this paper, we show that it is feasible to leverage the restricted semantics of synchronous data-flow models to optimize memory management. Our memory optimization approach includes two components: (1) We use abstract interpretation to analyze the complete memory behavior of a mobile sensing application and identify data sharing opportunities across components according to the live ranges of exchanged samples. Experiments indicate that the static analysis is precise for a majority of considered stream applications whose control logic does not depend on input data. (2) We propose novel heuristics for memory allocation that leverage the graph structure of applications to optimize data exchanges between application components to achieve not only significantly lower memory footprints but also increased stream processing throughput. We incorporate code generation techniques that transform a stream program into efficient C code. The memory optimizations are implemented as a new compiler for the StreamIt programming language. Experiments show that our memory optimizations reduce memory footprint by as much as 96% while matching or improving the performance of the StreamIt compiler with cache optimizations enabled. These results suggest that highly efficient stream processing engines may be built using synchronous data-flow languages.

[1]  César A. Muñoz,et al.  Verified Real Number Calculations: A Library for Interval Arithmetic , 2007, IEEE Transactions on Computers.

[2]  William G. Griswold,et al.  CitiSense: improving geospatial environmental assessment of air quality using a wireless personal exposure monitoring system , 2012, Wireless Health.

[3]  Edward A. Lee,et al.  Memory management for dataflow programming of multirate signal processing algorithms , 1994, IEEE Trans. Signal Process..

[4]  Ryan Newton,et al.  XStream: a Signal-Oriented Data Stream Management System , 2008, 2008 IEEE 24th International Conference on Data Engineering.

[5]  Paul Hudak,et al.  The aggregate update problem in functional programming systems , 1985, POPL.

[6]  Edward A. Lee,et al.  Cache Aware Scheduling for Synchronous Dataflow Programs , 2004 .

[7]  Marc Pouzet,et al.  A modular memory optimization for synchronous data-flow languages: application to arrays in a lustre compiler , 2012, LCTES '12.

[8]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[9]  William Thies,et al.  Linear analysis and optimization of stream programs , 2003, PLDI '03.

[10]  Zhigang Liu,et al.  Darwin phones: the evolution of sensing and inference on mobile phones , 2010, MobiSys '10.

[11]  Guobin Shen,et al.  BeepBeep: a high accuracy acoustic ranging system using COTS mobile devices , 2007, SenSys '07.

[12]  William Thies,et al.  Cache aware optimization of stream programs , 2005, LCTES '05.

[13]  William Thies,et al.  StreamIt: A Language for Streaming Applications , 2002, CC.

[14]  John L. Hennessy,et al.  Compile‐time copy elimination , 1993, Softw. Pract. Exp..

[15]  Andrew T. Campbell,et al.  BeWell+: multi-dimensional wellbeing monitoring with community-guided user feedback and energy optimization , 2012, Wireless Health.

[16]  Octav Chipara,et al.  CSense: A stream-processing toolkit for robust and high-rate mobile sensing applications , 2014, IPSN-14 Proceedings of the 13th International Symposium on Information Processing in Sensor Networks.

[17]  Martin Odersky,et al.  How to make destructive updates less destructive , 1991, POPL '91.

[18]  Patrick Cousot,et al.  Static determination of dynamic properties of programs , 1976 .

[19]  Jan Vitek,et al.  Streamflex: high-throughput stream programming in java , 2007, OOPSLA.

[20]  Edward A. Lee,et al.  Scheduling synchronous dataflow graphs for efficient looping , 1993, J. VLSI Signal Process..

[21]  Edward A. Lee,et al.  Static Scheduling of Synchronous Data Flow Programs for Digital Signal Processing , 1989, IEEE Transactions on Computers.

[22]  William Thies,et al.  Phased scheduling of stream programs , 2003, LCTES '03.

[23]  Jun Li,et al.  Crowd++: unsupervised speaker count with smartphones , 2013, UbiComp.

[24]  Ryan Newton,et al.  Design and evaluation of a compiler for embedded stream programs , 2008, LCTES '08.

[25]  Ken Kennedy,et al.  Scheduling Tasks to Maximize Usage of Aggregate Variables in Place , 2009, CC.

[26]  Edward A. Lee,et al.  Overview of the Ptolemy project , 2001 .

[27]  Zhigang Liu,et al.  The Jigsaw continuous sensing engine for mobile phone applications , 2010, SenSys '10.