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.

unlike Click, the <strong>TinyGALS</strong> model does not contain a task queue. 15<br />

Pull processing in sensor networks Although <strong>TinyGALS</strong> does not currently use pull<br />

processing, the following example by Jie Liu given in [42] illustrates a situation in which<br />

pull processing is desirable <strong>for</strong> eliminating unnecessary computation. Figure 25 shows a<br />

sensor network application in which four nodes cooperate to detect intruders. Each node<br />

is only capable <strong>of</strong> detecting intruders within a limited range <strong>and</strong> has a limited battery life.<br />

Communication with other nodes consumes more power than per<strong>for</strong>ming local compu-<br />

tations, so nodes should send data only when necessary. Node A has more power <strong>and</strong><br />

functionality than other nodes in the system. It is known that an intruder is most likely to<br />

come from the west, somewhat likely to come from the south, but very unlikely to come<br />

from the east or north. Under these assumptions, node A may want to pull data from other<br />

nodes only when needed. Figure 26 shows one possible configuration <strong>for</strong> this kind <strong>of</strong> pull<br />

processing. The center component is similar to the Click scheduler element. This example<br />

also demonstrates a way to per<strong>for</strong>m distributed multitasking. Node D (<strong>and</strong> others) may be<br />

free to per<strong>for</strong>m other computations while node A per<strong>for</strong>ms most <strong>of</strong> the intrusion detection.<br />

This could be an extension to the current single-node architecture <strong>of</strong> <strong>TinyGALS</strong>.<br />

North<br />

A D<br />

B C<br />

Figure 25: A sensor network application.<br />

15 Although, <strong>for</strong> backwards compatibility with TinyOS, the <strong>TinyGALS</strong> runtime system implementation<br />

supports TinyOS tasks, which are long running computations placed in the task queue by a TinyOS compo-<br />

nent method. The scheduler runs tasks in the task queue only after processing all events in the event queue.<br />

Additionally, tasks can be preempted by hardware interrupts. See 6.1 <strong>for</strong> more in<strong>for</strong>mation.<br />

54

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

Saved successfully!

Ooh no, something went wrong!