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.

gered modules in <strong>TinyGALS</strong> <strong>and</strong> tasks in TinyOS provide a method <strong>for</strong> deferring compu-<br />

tation. However, TinyOS tasks are not explicitly defined in the interface <strong>of</strong> the component,<br />

so it is difficult <strong>for</strong> a developer wiring <strong>of</strong>f-the-shelf components together to predict what<br />

non-interrupt driven computations will run in the system. In TinyOS tasks must be short;<br />

lengthy operations should be spread across multiple tasks. However, since there is no com-<br />

munication between tasks, the only way to share data is through the internal state <strong>of</strong> a<br />

component. The user must write synchronization code to ensure that there are no race con-<br />

ditions when multiple threads <strong>of</strong> execution access this data. <strong>TinyGALS</strong> modules, on the<br />

other h<strong>and</strong>, allow the developer to explicitly define “tasks” at the application level, which is<br />

a more natural way to write applications. The asynchronous <strong>and</strong> synchronous parts <strong>of</strong> the<br />

system are clearly separated to provide a well-defined model <strong>of</strong> computation, which leads<br />

to programs that are easier to debug. The globally asynchronous nature <strong>of</strong> <strong>TinyGALS</strong> pro-<br />

vides a way <strong>for</strong> tasks to communicate. The developer has no need to write synchronization<br />

code when using TinyGUYS to share data between tasks; the code is automatically gener-<br />

ated by the <strong>TinyGALS</strong> tools.<br />

6.2 Port-Based Objects<br />

The port-based object (PBO) [35] is a s<strong>of</strong>tware abstraction <strong>for</strong> designing <strong>and</strong> implementing<br />

dynamically reconfigurable real-time s<strong>of</strong>tware. The s<strong>of</strong>tware framework was developed <strong>for</strong><br />

the Chimera multiprocessor real-time operating system (RTOS). A PBO is an independent<br />

concurrent process, <strong>and</strong> there is no explicit synchronization with other processes. PBOs<br />

may execute either periodically or aperiodically. A PBO communicates other PBOs only<br />

through its input ports <strong>and</strong> output ports. Configuration constants are used to reconfigure<br />

generic components <strong>for</strong> use with specific hardware or applications. PBOs may also have<br />

resource ports that connect to sensors <strong>and</strong> actuators via I/O device drivers, which are not<br />

PBOs.<br />

Communication between PBOs is per<strong>for</strong>med via state variables stored in global <strong>and</strong><br />

local tables. Every input <strong>and</strong> output port <strong>and</strong> configuration constant is defined as a state<br />

44

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

Saved successfully!

Ooh no, something went wrong!