Wireless Sensor Networks : Technology, Protocols, and Applications
Wireless Sensor Networks : Technology, Protocols, and Applications
Wireless Sensor Networks : Technology, Protocols, and Applications
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
278 OPERATING SYSTEMS FOR WIRELESS SENSOR NETWORKS<br />
10.3.3. MagnetOS<br />
MagnetOS [10.4] is a distributed adaptive operating system designed specifically<br />
for application adaptation <strong>and</strong> energy conservation. Other operation systems do<br />
not provide a network-wide adaptation mechanism or policies for application to<br />
effectively utilize the underlying node resources. The burden of creating adaptation<br />
mechanisms (if any) is on the application itself. This approach is usually not energy<br />
efficient. The goals of MagnetOS are (1) to adapt to the underlying resource <strong>and</strong> its<br />
changes in a stable manner, (2) to be efficient with respect to energy conservation,<br />
(3) to provide general abstraction for the applications, <strong>and</strong> (4) to be scalable for<br />
large networks.<br />
MagnetOS is a single system image (SSI) or a single unified Java virtual<br />
machine that includes static <strong>and</strong> dynamic components. The static components<br />
rewrite the application in byte-code level <strong>and</strong> add necessary instructions on<br />
the semantics of the original applications. The dynamic components are used for<br />
application monitoring, object creation, invocation, <strong>and</strong> migration. SSI abstraction<br />
provides more freedom in object placement <strong>and</strong> simplifies application development.<br />
MagnetOS provides an interface to programmers for explicit object placement <strong>and</strong><br />
override of the automatic object placement decisions. This OS also provides<br />
two online power-aware algorithms (NetPull <strong>and</strong> NetCenter) for use in moving<br />
application components within the entire network so as to reduce energy consumption<br />
<strong>and</strong> extend network lifetime. Netpull works hop by hop at the physical layer,<br />
<strong>and</strong> NetCenter runs multihop at the network level. The difference between<br />
traditional ad hoc routing <strong>and</strong> NetPull (NetCenter) is that the communication<br />
endpoints in ad hoc routing are fixed, whereas NetPull tries to move the<br />
communication endpoints in order to conserve energy [10.4].<br />
10.3.4 MANTIS<br />
MANTIS [10.5] is a multithread embedded operating system, which with its<br />
general single-board hardware enables flexible <strong>and</strong> fast deployment of applications.<br />
With the key goal of ease for programmers, MANTIS uses classical layered<br />
multithreaded structure <strong>and</strong> st<strong>and</strong>ard programming language. The layered structure<br />
contains multithreading, preemptive scheduling with time slicing, I/O synchronization<br />
via mutual exclusion, a network protocol stack, <strong>and</strong> device drivers. The<br />
current MANTIS kernel realizes these functions in less than 500 bytes of RAM.<br />
MANTIS uses st<strong>and</strong>ard C to implement the kernel <strong>and</strong> API.<br />
In the current implementation of MANTIS, the RAM size allocated to each new<br />
thread is fixed. The thread table stored in a global data structure has a capacity for of<br />
items, each of which is 10 bytes <strong>and</strong> is used to store thread-related information. The<br />
thread scheduler in MANTIS is priority based <strong>and</strong> round robin within each priority<br />
level. The scheduler is triggered only by timer interrupts from hardware to perform<br />
context switching. In MANTIS, other interrupts are h<strong>and</strong>led by device drivers.<br />
The network protocol stack in MANTIS has four layers: application, network,<br />
MAC, <strong>and</strong> physical. MANTIS implements these as one or more user-level threads,