A Concurrency Abstraction for Reliable Sensor Network Applications
- Cite this paper as:
- Sallai J., Maróti M., Lédeczi Á. (2007) A Concurrency Abstraction for Reliable Sensor Network Applications. In: Kordon F., Sztipanovits J. (eds) Reliable Systems on Unreliable Networked Platforms. Monterey Workshop 2005. Lecture Notes in Computer Science, vol 4322. Springer, Berlin, Heidelberg
The prevailing paradigm in the regime of resource-constrained embedded devices is event-driven programming. It offers a lightweight yet powerful concurrency model without multiple stacks resulting in reduced memory usage compared to multi-threading. However, event-driven programs need to be implemented as explicit state machines, often with no or limited support from the development tools, resulting in ad-hoc and unstructured code that is error-prone and hard to debug. This paper presents TinyVT, an extension of the nesC language that provides a virtual threading abstraction on top of the event-driven execution model of TinyOS with minimal penalty in memory usage. TinyVT employs a simple continuation mechanism to permit blocking wait, thus allowing split-phase operations within C control structures without relying on multiple stacks. Furthermore, it provides fine-grained scoping of variables shared between event handlers resulting in safer code and allowing for optimizations in compile-time memory allocation. TinyVT source code is mapped to nesC with a source-to-source translator, using synchronous communicating state machines as an intermediate representation.
Unable to display preview. Download preview PDF.