03.08.2013 Views

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 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Solution 4 Prioritize writes such that once a high priority writer has written to the TinyGUYS<br />

global variables, lower priority writes will be lost.<br />

Summary We have just discussed system determinacy in the case <strong>of</strong> a single interrupt<br />

<strong>and</strong> determination <strong>of</strong> system state when a module iteration is interrupted by one or more<br />

interrupts.<br />

If we do not use one <strong>of</strong> the solutions presented, the system state at the completion <strong>of</strong> an<br />

interrupted module iteration depends on the timing <strong>of</strong> the interrupts. Without prescheduling<br />

module iterations, the next quiescent system state after an interrupted module iteration is<br />

also highly dependent on module execution times <strong>and</strong> the timing <strong>of</strong> the interrupts.<br />

However, event-driven systems are usually designed to be reactive. In these cases,<br />

interrupts should be considered as high priority events which should affect the system state<br />

as soon as possible.<br />

4 Code Generation<br />

Given the highly structured architecture <strong>of</strong> the <strong>TinyGALS</strong> model, code <strong>for</strong> scheduling <strong>and</strong><br />

event h<strong>and</strong>ling can be automatically generated to release s<strong>of</strong>tware developers from writing<br />

error-prone concurrency control code. We have created a set <strong>of</strong> code generation tools <strong>for</strong><br />

the MICA motes that, given the definitions <strong>for</strong> the components, modules, <strong>and</strong> application,<br />

will automatically generate all the code necessary <strong>for</strong> (1) component links <strong>and</strong> module<br />

connections, (2) system initialization <strong>and</strong> start <strong>of</strong> execution, (3) communication between<br />

modules, <strong>and</strong> (4) TinyGUYS global variable reads <strong>and</strong> writes.<br />

In this section, we also give an overview <strong>of</strong> the implementation <strong>of</strong> the <strong>TinyGALS</strong> sched-<br />

uler <strong>and</strong> how it interacts with TinyOS, as well as data on the memory usage <strong>of</strong> <strong>TinyGALS</strong>.<br />

31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!