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.

3 Discussion<br />

In this section we discuss issues related to determinacy <strong>of</strong> a <strong>TinyGALS</strong> program. We begin<br />

with definitions <strong>for</strong> a <strong>TinyGALS</strong> system, system state (including quiescent system state<br />

<strong>and</strong> active system state), module iteration (in response to an interrupt <strong>and</strong> in response to<br />

an event), <strong>and</strong> system execution. We also review the conditions <strong>for</strong> well-<strong>for</strong>medness <strong>of</strong> a<br />

<strong>TinyGALS</strong> system.<br />

Definition 1 (System). A system consists <strong>of</strong> an application <strong>and</strong> a global event queue. Recall<br />

that an application is defined as:<br />

A = (MODULESA,GLOBALSA,VARMAPSA,CONNECT IONSA,STARTA).<br />

Recall that the inport associated with a connection between modules has a FIFO queue<br />

<strong>for</strong> ordering <strong>and</strong> storing events destined <strong>for</strong> the inport. The global event queue provides<br />

an ordering <strong>for</strong> tokens in all inport queues. Whenever a token is stored in an inport queue,<br />

a representation <strong>of</strong> this event (implemented as an identifier <strong>for</strong> the inport queue) is also<br />

inserted into the global event queue. Thus, events that are produced earlier in time appear<br />

in the global event queue be<strong>for</strong>e events that are produced later in time (with respect to the<br />

system clock). Events that are produced at the same time (e.g., as in Figures 12 or 10) are<br />

ordered first by order <strong>of</strong> appearance in the application modules list (MODULESA), then<br />

by order <strong>of</strong> appearance in the modules inports list (INPORT S ′ M , which is an ordered list<br />

created from the modules inports set INPORT SM).<br />

Module M<br />

(event,t0)<br />

(event,t0)<br />

Figure 12: Two events are produced at the same time.<br />

Definition 2 (System state). The system state consists <strong>of</strong> four main items:<br />

23

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

Saved successfully!

Ooh no, something went wrong!