21.08.2013 Views

A State-Based Programming Model for Wireless Sensor Networks

A State-Based Programming Model for Wireless Sensor Networks

A State-Based Programming Model for Wireless Sensor Networks

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.

3.5. Overview and Examples of <strong>State</strong>-of-the-Art Operating Systems 51<br />

<strong>Programming</strong> Framework Process <strong>Model</strong> <strong>Programming</strong> <strong>Model</strong> Target Device<br />

Operating<br />

System<br />

TinyOS<br />

[45]<br />

Maté VM<br />

[79]<br />

BTnode<br />

[21]<br />

BTnut<br />

[123]<br />

SOS<br />

[52]<br />

Contiki<br />

[37]<br />

Impala<br />

[81]<br />

MANTIS<br />

[8]<br />

Progr.<br />

Language<br />

Concurrency<br />

Dynamic<br />

Loading<br />

Scheduling Dyn.<br />

Mem.<br />

processor core, clock, RAM,<br />

ROM, secondary storage<br />

nesC no no events no Berkeley Motes<br />

8-bit, 8 MHz, 4 Kb, 128 Kb, -<br />

Maté<br />

bytecode<br />

no yes events no Berkeley Motes<br />

8-bit, 8 MHz, 4 Kb, 128 Kb, -<br />

C no no events no a BTnode (ver. 1 and 2)<br />

8-bit, 8 MHz, 4 Kb, 128 Kb<br />

C no no threads b no a BTnode (ver. 3)<br />

8-bit, 8 MHz, 64 Kb, 128 Kb,<br />

192 Kb RAM<br />

C yes yes events yes c Berkeley Motes and others<br />

8-bit, 8 MHz, 4 Kb, 128 Kb, -<br />

C yes yes events and<br />

threads d<br />

n/a n/a n/a prioritized<br />

events<br />

no a ESB node [47]<br />

16-bit, 1 MHz, 2 Kb, 60 Kb, -<br />

yes c ZebraNet node<br />

16-bit, 8 Mhz, 2 Kb, 60 Kb,<br />

512 Kb Flash RAM<br />

C yes yes threads d no Mantis node<br />

8-bit, 8 MHz, 4 Kb, 128 Kb, -<br />

a Dynamic memory allocation is provided by the standard C library libc <strong>for</strong> Atmel microcontrollers<br />

but is neither used in the OS implementation nor recommended <strong>for</strong> application programming.<br />

b Cooperative multi-threading.<br />

c Fixed (i.e., predefined) block sizes only.<br />

d Preemptive multi-threading.<br />

Table 3.1: Current programming frameworks <strong>for</strong> resource-constrained sensor<br />

nodes. The frameworks’ runtime environment (as provided by the<br />

system software) supports different process models and programming<br />

models as discussed in sections 3.2 and 3.4. (n/a: feature not specified<br />

in the available literature.)<br />

de facto standard of sensor-node operating systems, TinyOS. We will discuss<br />

their features and their deviations to the basic model in more detail.<br />

3.5.1 The BTnode System Software<br />

The BTnode system software (see Fig. 3.3) is a lightweight OS written in C and<br />

assembly language that has been initially developed <strong>for</strong> the first version of the<br />

BTnode. The system provides an event-based programming model.<br />

It does not provide dynamic loading of processes and has a non-concurrent<br />

process model. Though dynamic memory allocation is available, the system<br />

software is only using static memory allocation to avoid reliability issues. Application<br />

programmers are also strongly discouraged to used dynamic memory<br />

allocation. The drivers, which are available <strong>for</strong> many hardware subsystems and<br />

extensions (e.g, the Bluetooth radio and several sensors subsystems), provide<br />

convenient, event-driven APIs <strong>for</strong> application development.<br />

The BTnode system is composed of four principal components (see Fig. 3.3):<br />

the sensor-node hardware, the drivers, the dispatcher, and an application (which

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

Saved successfully!

Ooh no, something went wrong!