2.4 Operating Systems and Execution Environments
2.4 Operating Systems and Execution Environments
20ECEL602
CODE
UNIT NO 2
SENSOR NETWORK ARCHITECTURES
III VI
20ECEL602
WIRELESS SENSOR NETWORKS
20ECEL602
2
20ECEL602
Programming Paradigms
1. Concurrent Programming • The support for concurrent execution is
crucial for WSN nodes to handle data coming from arbitrary sources like
multiple sensors or the radio transceiver at arbitrary points in time. • For
example, a system can poll a sensor to decide whether data is available
and process the data, then poll the transceiver to check whether a packet
is available and then immediately process the packet and so on.
3
20ECEL602
Contd..
2. Process Based Concurrency
Most general-purpose operating systems support concurrent execution of
multiple processes on a single CPU. Hence such a process-based
approach can be used to support concurrency in a sensor node as
illustrated in (b) of Figure 10. • Mapping such an execution model of
concurrent processes to a sensor node shows that there are some
granularity mismatches. • This problem is severe for smaller tasks to be
executed when compared to overhead.
4
20ECEL602
5
20ECEL602
Contd..
3. Event-based Programming • The system waits for any event to happen,
where an event can be the availability of data from a sensor, or arrival of a
packet. • Such an event is then handled by a short sequence of
instructions that stores the occurrence of event and necessary
information. • This is called event based programming model as shown in
Figure 11. • This programming model distinguishes between two different
“contexts”: - time-critical event handlers (execution cannot be interrupted)
and for the processing of normal code (only triggered by the event
handlers).
6/22/2020 6
20ECEL602
7
20ECEL602
Contd..
4. Interfaces to Operating System • In WSNs, the interfaces should be
accessible from protocol implementations. • This interface is closely tied
with the structure of protocol stacks. • For example Application
Programming Interface (API) comprises, a “functional interface, object
abstractions, and detailed behavioral semantics”. • Abstractions are
wireless links, nodes and so on. • The possible functions include state
inquiry, manipulation, transmitting of data, access to hardware and setting
of policies.
8
20ECEL602
9
20ECEL602
10
20ECEL602
Contd..
2. Controlling Dynamic Voltage Scaling • For example, only a single task has to be
run in an operating system. Hence, a clever scheduler is required to decide exact
clock rate to use in that situation to meet all deadlines. This can require feedback
from applications for example, video playback in reference. 3. Trading off fidelity
against energy consumption •There are certain tasks that can be computed with a
higher or lower level of accuracy. The fidelity achieved by such tasks is a
candidate for trading off against other resources. In a WSN, the natural trade-off is
against energy required to compute a task.
20ECEL602