TinyGALS: A Programming Model for Event-Driven Embedded Systems


Researchers: Elaine Cheong
Advisor:Edward A. Lee

TinyGALS [1] [2] is a globally asynchronous, locally synchronous model for programming event-driven embedded systems, especially sensor networks. At the local level, software components communicate with each other synchronously via method calls. Components are composed to form modules. At the global level, modules communicate with each other asynchronously via message passing, which separates the flow of control between modules. A complementary model called TinyGUYS is a guarded yet synchronous model designed to allow thread-safe sharing of global state between modules without explicitly passing messages. The TinyGALS programming model is structured such that code for all intermodule communication, module triggering mechanisms, and access to guarded global variables can be automatically generated from a high level specification.

The TinyGALS code generation toolset was designed to be compatible with software components written for TinyOS (version 0.6.1). TinyOS is a component-based runtime environment for the Motes [4]. TinyOS and the Motes comprise a wireless sensor network platform being developed and used at the Intel Research Lab in Berkeley.

I propose reimplementing TinyGALS to be compatible with the latest version of TinyOS (version 1.x), which uses the nesC programming language. The nesC programming constructs provide many features that allow for better code generation and static analysis of programs. This is especially important in severely memory-constrained and safety-critical systems. I would like to investigate further the interaction between the execution of TinyGALS modules and TinyOS tasks. There are several ways in which a new TinyGALS scheduler could be constructed, including scheduling the scheduler itself as a recurring TinyOS task. These approaches would need to preserve the reactive nature and timing requirements of the embedded target application.

We can also use Ptolemy II to experiment with TinyGALS at a higher, more abstract level. Ptolemy II [3] is a software system for modeling, design, and simulation of heterogeneous, concurrent, real-time, embedded systems. Developers of Ptolemy II models may choose different execution semantics (called a domain), depending on the particular type of application domain. By writing a TinyGALS domain within Ptolemy II, we can discover how TinyGALS semantics interact with models of computation commonly used in applications such as signal processing, control systems, network processors, and/or real-time operating systems.

I would also like to research how to generate C code from Ptolemy II models. A good target platform for the code generator is the Mote, which has the memory and power constraints typical of many embedded platforms. A TinyGALS domain could use this C code generator to generate code directly for the Motes, or it could take advantage of a nesC-compatible version of TinyGALS. The wireless networking capabilities of the Motes, however, present a unique challenge. We can investigate how to partition a software application in order to achieve distributed multitasking among unreliable nodes.

[1]
E. Cheong, J. Liebman, J. Liu, F. Zhao, "TinyGALS: A Programming Model for Event-Driven Embedded Systems," in Proc. of the 18th Annual ACM Symposium on Applied Computing (SAC'03), Melbourne, FL, Mar. 9-12, 2003. http://ptolemy.eecs.berkeley.edu/papers/03/TinyGALS
[2]
Elaine Cheong, "Design and Implementation of TinyGALS: A Programming Model for Event-Driven Embedded Systems," Master's Report, Technical Memorandum No. UCB/ERL M03/14, University of California, Berkeley, CA, 94720, USA, May 23, 2003. http://ptolemy.eecs.berkeley.edu/papers/03/TinyGALSreport
[3]
The Ptolemy Project. http://ptolemy.eecs.berkeley.edu
[4]
TinyOS. http://webs.cs.berkeley.edu/tos

Last updated 11/20/03