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.

1 Introduction<br />

Emerging embedded systems, such as sensor networks [41], intelligent vehicle/highway<br />

systems [23], smart <strong>of</strong>fice spaces [38, 37], peer-to-peer collaborative cell phones <strong>and</strong> PDAs<br />

[14], are usually networked <strong>and</strong> event-driven. In these systems, the communication network<br />

is typically <strong>for</strong>med in an ad hoc manner, <strong>and</strong> the embedded computers must react to many<br />

(typically unstructured) stimuli, including physical events, user comm<strong>and</strong>s, <strong>and</strong> messages<br />

from other systems. In other words, external events drive the computation in the embedded<br />

system.<br />

As the complexity <strong>of</strong> networked embedded systems grows, the costs <strong>of</strong> developing<br />

s<strong>of</strong>tware <strong>for</strong> these systems increases dramatically. Embedded s<strong>of</strong>tware designers face is-<br />

sues such as maintaining consistent state across multiple tasks, h<strong>and</strong>ling interrupts, avoid-<br />

ing deadlock, scheduling concurrent threads, managing resources, <strong>and</strong> conserving power<br />

[17, 26]. Typical technologies <strong>for</strong> developing embedded s<strong>of</strong>tware, inherited from writing<br />

device drivers <strong>and</strong> optimizing assembly code to achieve a fast response <strong>and</strong> a small memory<br />

footprint, do not scale with the application complexity. In fact, it was not until recently that<br />

“high-level” languages such as C <strong>and</strong> C++ replaced assembly language as the dominant<br />

embedded s<strong>of</strong>tware programming languages. Most <strong>of</strong> these high-level languages, however,<br />

are designed <strong>for</strong> writing sequential programs to run on an operating system <strong>and</strong> fail to<br />

h<strong>and</strong>le concurrency intrinsically.<br />

Modern s<strong>of</strong>tware engineering practices advocate the use <strong>of</strong> s<strong>of</strong>tware components such<br />

as st<strong>and</strong>ard libraries, objects, <strong>and</strong> s<strong>of</strong>tware services to reduce redundant code develop-<br />

ment <strong>and</strong> improve productivity. However, when developing a component it is not <strong>for</strong>esee-<br />

able whether it should lock any resources. A s<strong>of</strong>tware component that does not include<br />

synchronization code may not be thread-safe, <strong>and</strong> may exhibit unexpected behavior when<br />

composed with other components. On the other h<strong>and</strong>, if a s<strong>of</strong>tware component is developed<br />

with resource synchronization in mind, then it may be overspecified in an application that<br />

1

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

Saved successfully!

Ooh no, something went wrong!