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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

into an imperative language like C. There are two types <strong>of</strong> actors – an interrupt service rou-<br />

tines (ISR) responds to external events, <strong>and</strong> a task is triggered entirely by events produced<br />

by peer actors. These two types do not intersect. In a TM model, an ISR usually appears<br />

as a source actor or a port that transfers events into the model. ISRs do not have triggering<br />

rules, <strong>and</strong> outputs are made immediately available as trigger events to downstream actors.<br />

An ISR is synthesized as an independent thread. Tasks have a much richer set <strong>of</strong> interfaces<br />

than ISRs <strong>and</strong> have a set <strong>of</strong> methods that define the split-phase reaction <strong>of</strong> a task. The TM<br />

runtime system uses an event dispatcher to trigger a task when a new event is received at its<br />

port. Events on a connection between two actors are represented by a global data structure,<br />

which contains the communicating data, a mutual-exclusion lock to guard the access to the<br />

variable if necessary, <strong>and</strong> a flag indicating whether the event has been consumed.<br />

We suggested in Section 3.1 that a partial method <strong>of</strong> reducing non-determinacy due<br />

to one or more interrupts during a module iteration is to delay producing outputs from a<br />

module until the end <strong>of</strong> its iteration. This is similar to the TM method <strong>of</strong> only producing<br />

outputs at the end <strong>of</strong> an actor’s deadline.<br />

7 Conclusion<br />

This report describes the <strong>TinyGALS</strong> programming model <strong>for</strong> event-driven multitasking<br />

embedded systems. The globally asynchronous, locally synchronous model allows s<strong>of</strong>t-<br />

ware designers to use high-level constructs such as ports <strong>and</strong> message queues to separate<br />

the flow <strong>of</strong> control between modules that contain components composed <strong>of</strong> method calls.<br />

Guarded yet synchronous variables (TinyGUYS) provide a means <strong>of</strong> exchanging global<br />

data between asynchronous modules without triggering reactions. <strong>TinyGALS</strong> contains no<br />

blocking mechanisms in the language constructs, which means there is not potential <strong>of</strong><br />

deadlock.<br />

We showed that given a single interrupt, the path <strong>of</strong> a <strong>TinyGALS</strong> system from one<br />

57

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

Saved successfully!

Ooh no, something went wrong!