Design and Implementation of TinyGALS: A Programming Model for ...
Design and Implementation of TinyGALS: A Programming Model for ...
Design and Implementation of TinyGALS: A Programming Model for ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>TinyGALS</strong> language constructs, as well as code <strong>for</strong> guarding access to TinyGUYS global<br />
variables. We have implemented this <strong>for</strong> use on the MICA motes [15], a wireless sensor<br />
network plat<strong>for</strong>m. The <strong>TinyGALS</strong> programming model <strong>and</strong> code generation facilities can<br />
greatly improve s<strong>of</strong>tware productivity <strong>and</strong> encourage component reuse.<br />
Our model is influenced by the TinyOS project at the University <strong>of</strong> Cali<strong>for</strong>nia, Berke-<br />
ley [21]. We use the TinyOS component specification syntax in our tools so that users can<br />
reuse existing TinyOS v0.6.1 [5] components in <strong>TinyGALS</strong> applications. TinyOS compo-<br />
nents provide an interface abstraction that is consistent with synchronous communication<br />
via method calls. However, unlike our model, concurrent tasks in TinyOS are not ex-<br />
posed as part <strong>of</strong> the component interface. Lack <strong>of</strong> explicit management <strong>of</strong> concurrency<br />
<strong>for</strong>ces component developers to manage concurrency by themselves (locking <strong>and</strong> unlock-<br />
ing semaphores), which makes TinyOS components extremely difficult to develop.<br />
Our approach differs from coordination models like those discussed above in that we<br />
allow designers to directly control the concurrent execution <strong>and</strong> buffer sizes among asyn-<br />
chronous modules. At the same time, we use a thread-safe global data space to store mes-<br />
sages that do not trigger reactions. Components in our model are entirely sequential, <strong>and</strong><br />
they are both easy to develop <strong>and</strong> backwards compatible with most legacy s<strong>of</strong>tware. We<br />
also do not rely on the existence <strong>of</strong> an operating system. Instead, we generate the schedul-<br />
ing framework as part <strong>of</strong> the application.<br />
The remainder <strong>of</strong> this report is organized as follows. Section 2 describes the <strong>TinyGALS</strong><br />
language constructs <strong>and</strong> semantics. Section 3 discusses issues related to determinacy <strong>of</strong> a<br />
<strong>TinyGALS</strong> program. Section 4 explains a code generation technique based on the two-<br />
level execution hierarchy <strong>and</strong> a system-level scheduler. Section 5 gives an example <strong>of</strong><br />
developing a multi-hop routing protocol using the <strong>TinyGALS</strong> model. Section 6 discusses<br />
related work, emphasizing relevant embedded s<strong>of</strong>tware models. Section 7 concludes this<br />
report <strong>and</strong> describes directions <strong>for</strong> future work.<br />
5