Sign up & Download
Sign in

Multithreading Optimization Techniques for Sensor Network Operating Systems

by Hyoseung Kim, Hojung Cha
Optimization (2007)

Cite this document (BETA)

Available from www.springerlink.com
Page 1
hidden

Multithreading Optimization Techniques for Sensor Network Operating Systems

K. Langendoen and T. Voigt (Eds.): EWSN 2007, LNCS 4373, pp. 293



308, 2007.
' Springer-Verlag Berlin Heidelberg 2007
Multithreading Optimization Techniques
for Sensor Network Operating Systems
Hyoseung Kim and Hojung Cha

Department of Computer Science, Yonsei University
Seodaemun-gu, Shinchon-dong 134, Seoul 120-749, Korea
{hskim, hjcha}@cs.yonsei.ac.kr
Abstract. While a multithreading approach provides a convenient sensor
application developing environment with automatic control flow and stack
managment, it is considered to have a larger data memory requirement and
energy consumption than an event-driven model. Current threaded sensor
operating systems unfortunately do not provide appropriate solutions. This
paper presents multithreading optimization techniques for sensor network
operating systems. Our work focuses on the three major problems of
implementing threads on resource-constraint sensor nodes—memory resources,
energy consumption, and scheduling policy. Single kernel stack and the thread
stack-size analysis techniques reduce the RAM requirement of thread model.
The variable timer saves energy consumption and the event-boosting thread
scheduling reflects the characteristics of sensor applications and provides fast
response time to threads. The experimental results on a common sensor node
show that the multithreaded system could be effectively implemented with
reasonable overhead.
Keywords: sensor network operating system, multithreading optimization
technique.
1 Introduction
Wireless sensor networks have been well-studied in terms of the increasing variety of
hardware and the development of diverse applications which now require
sophisticated system software. Sensor nodes are normally battery-operated, memory-
limited and have low computational power. Sensor network operating systems,
therefore, should support high concurrency with minimal memory usage and low
energy consumption. Unlike general purpose operating systems, popular sensor
operating systems such as TinyOS [1] and SOS [2] adopt an event-driven model to
meet these tight constraints. They execute applications with reactive event handlers
and cooperatively-operated run-to-completion tasks. Li et al. [3] reported that the
event-driven TinyOS achieves about a 30-fold improvement in data memory
requirement and a 12-fold reduction in power consumption over general purpose
multithreaded embedded operating systems.
Although the event-driven sensor operating systems are implemented efficiently in
a resource-constraint environment, they do not provide all the functions of general
Page 2
hidden
294 H. Kim and H. Cha

purpose operating systems. Developers typically suffer from the manual configuration
when programming applications. With TinyOS and SOS, for example, developers
have to split a long-running task, which can unnecessarily delay other tasks, into
several phases. Programmers also take responsibility for managing event handlers’
states. As tasks are inter-dependent in the execution context, the repeated analysis of
system concurrency and system restructuring is inevitable in order to meet the
changes in application requirements [4].
In contrast to the event-driven approach, multithreading inherently provides high
concurrency with preemption and automatic state management. It also allows
programmers to specify control flow. Sensor applications frequently request sensing
and radio communication. With an event-driven model, the programmers may split
one conceptual function into multiple functions for I/O operations, but multithread
systems easily handle it by blocking the I/O interface. Synchronization and deadlock
problems experienced with thread [5] can be managed by compiler support and
development tools [6]. As most existing development tools are based on threads,
multithread systems could provide a general and more efficient development
environment. However, threads tend to incur more time and space overhead than
events. Stack reservation for each stack is indispensable for multithreading systems.
Context switching overhead is caused by preemption and blocking. Kernel services,
such as a scheduler and system timer management, are also required. Data memory
and energy requirement of multithreading is an obvious obstacle to the resource-
constraint sensor nodes. In addition, a scheduling policy optimized for sensor
applications should be developed. Although the multithreading approach is attractive
in sensor application developments, current thread-based sensor operating systems [7,
8] do not provide appropriate solutions for overhead problems or a scheduling issue.
This has motivated us to develop multithreading techniques specifically designed for
sensor nodes.
This paper presents optimized techniques for the implementation of multithreaded
sensor network operating systems. The thread model for sensor nodes should consider
memory resource, energy consumption, and scheduling policy. The proposed
techniques contribute to each issue by providing multithreading functions while
consuming reasonable overhead compared to existing event-driven sensor operating
systems. Our techniques are implemented in the RETOS operating system [9, 10, 11],
although they are applicable to other thread-based sensor operating systems. The
effectiveness of the proposed techniques is validated by experiments conducted on a
commercial mote running the RETOS operating system.
The rest of this paper is organized as follows: Section 2 describes the proposed
multithreading optimization techniques; Section 3 validates the effectiveness of the
mechanism through real experiments; Section 4 discusses related work; and Section 5
concludes the paper.
2 Thread Optimization for Sensor Applications
This section explains optimization techniques for implementing threads on sensor
nodes. Considering the resource constraints of conventional sensor hardware, we
propose various techniques in our work: Single kernel stack reduces the size of thread

Sign up today - FREE

Mendeley saves you time finding and organizing research. Learn more

  • All your research in one place
  • Add and import papers easily
  • Access it anywhere, anytime

Start using Mendeley in seconds!

Already have an account? Sign in

Readership Statistics

6 Readers on Mendeley
by Discipline
 
 
by Academic Status
 
33% Ph.D. Student
 
17% Student (Bachelor)
 
17% Doctoral Student
by Country
 
17% India
 
17% South Korea
 
17% Switzerland

Groups

pool