Hybrid Real-Time Operating System for Resource-Constraint Wireless Sensor Nodes

Hybrid Real-Time Operating System for Resource-Constraint Wireless Sensor Nodes

JOURNAL OF SOFTWARE, VOL. 9, NO. 7, JULY 2014 1767 Hybrid Real-time Operating System for Resource-constraint Wireless Sensor Nodes 1,2Xing Liu, 2*corresponding author Kun Mean Hou, 2Christophe de Vaulx, 1Chengcheng Guo, 2Hongling Shi, 2Bin Tian 1Laboratory of Internet and Information Technology, Wuhan University, Wuhan, China Email: [email protected] 2LIMOS Laboratory UMR 6158 CNRS, Blaise Pascal University, Clermont-Ferrand, France Email: {liu, kun-mean.hou, devaulx, shi}@isima.fr Abstract—Wireless sensor network (WSN) has been used in consumption. Secondly, the real-time response is required widespread domains, and the real-time response is required by many WSN applications, such as the engine control by many WSN applications. However, due to the memory process in the industrial system, the heart pacemakers resources limitation on the sensor nodes, the current WSN monitoring in the medical system, etc. However, the OSs such as TinyOS, Contiki, SOS, mantisOS, etc., are not real-time ones. To achieve the objective of designing a real- current popular WSN OSs, such as TinyOS, Contiki, etc., time OS with low memory resource consumption, a new cannot support the real-time reaction well. Thirdly, the WSN OS named HEROS is developed and presented in this WSN application development process is complicated for paper. For HEROS, it adopts a hybrid scheduling strategy. the users since the underlying WSN hardware and Both the event-driven and multithreading schedulers are software platforms are diverse [6]. implemented in parallel, and these two schedulers can Up to now, several WSN OSs have been developed, switch to each other when necessary. By this means, such as TinyOS [7], Contiki [8], SOS [9], MantisOS [10], HEROS take advantages of both the event-driven system's BitCloud OS [11], LIMOS [12], uCOS [13], AVRX [14], low memory resource consumption as well as etc. However, these OSs cannot address the above multithreading system's high real-time performance. Besides these, HEROS uncouples the applications from the challenges well. On one hand, most of these OS [7-9, 11, underlying systems by using the pre-linked mechanism 12] are the event-driven scheduling OSs. For these OSs, (PLM). With this mechanism, a user-friendly development the advantage is the memory resource consumption is low, environment can be provided to the WSN users. Finally, to whereas the real-time performance is poor as the evaluate the performance of HEROS, it is compared with preemption cannot be supported. For the other OSs such some other WSN OSs on the iLive platform (8-bit AVR as [10, 13, 14], the multithreading scheduling model is microcontroller). The final experimental and evaluation used. With the multithreading scheduler, the preemption results prove that HEROS is a memory resources efficient, can be achieved by the thread switch. Consequently, real-time supported and user-friendly OS, and can be used these OSs have the real-time performance better than the on most resource-constrained sensor nodes to support the diverse kinds of WSN applications. event-driven ones. Nevertheless, the memory resource consumption of these OSs is relatively high as each Index Terms— operating system, real-time , hybrid, wireless thread needs to have its own run-time stacks. Thus, how sensor network to achieve an OS which has good real-time performance as well as consumes less memory resources become I. INTRODUCTION AND BACKGROUAND essential for the current WSN OSs. On the other hand, the monolithic system architecture is used in many current Wireless sensor nodes (WSN) have been used in WSN OSs [10-13]. For these OSs, the applications are widespread domains ranging from the precise agriculture not uncoupled from the systems, thus it is difficult for the to the military surveillance [1-4]. And for the software WSN users to develop the applications as they are development on sensor nodes, the operating system (OS) required to understand the low-level system details. For is one of the key technologies. This is because an [7-9], the applications can be separated from the systems outstanding OS can not only manage the platform either by the virtual machines (VMs) [7, 15, 16, 17] or by resources well, but also provide good services for the the dynamic linking mechanisms (DLM) [18, 8, 9]. Yet, WSN applications. they are still not sound. Because for [7], the applications Currently, several challenges exist for the WSN OS should be programmed by using the non-popular byte development. Firstly, the WSN platform resources are code instructions directly. And for [8, 9], the memory constrained [5]. Most sensor nodes are small size and low resource consumption of the DLM is high and the code price ones with limited memory resources, e.g., the loading process in DLM is also complicated. Due to these sensor nodes equipped with the AVR ATmega1281 reasons, the design and implementation of a new WSN microcontroller has only 8 kilobytes RAM. Therefore, a OS becomes essential. good WSN OS should have low memory resources © 2014 ACADEMY PUBLISHER doi:10.4304/jsw.9.7.1767-1780 1768 JOURNAL OF SOFTWARE, VOL. 9, NO. 7, JULY 2014 In this paper, a hybrid real-time OS HEROS is means of the thread switch, the real-time performance in developed to address the challenges above. The key multithreading systems can be better than that in the features of HEROS include the following aspects: Firstly, event-driven systems. However, the memory resource it adopts a hybrid scheduling mechanism. Both the event- consumption is also higher if compared with that in the driven and multithreading schedulers are implemented. event-driven one [19]. In Table I, a comparison between Event-driven is used to dispatch the non real-time events the event-driven and the multi-threading OS is shown. while the multithreading scheduler is used to dispatch the Besides the pure event-driven and multithreading OSs, real-time events. Secondly, it implements a dynamic some current OSs have implemented both the event- memory allocator which avoids some drawbacks of the driven and multithreading schedulers in the system, such allocator in the current WSN OSs. By means of the as the TinyOS [7], Contiki [8] and LIMOS [12]. However, dynamic memory allocator as well as the hybrid the multithreading scheduler in these OSs is implemented scheduler, HEROS can react to the time-critical events as an optional library upon the event-driven scheduler with low memory resources consumption. Thirdly, the (presented in detail in the related work in the section XI). applications in HEROS are uncoupled from the systems Therefore, these OSs [7,8,12] are not native hybrid by using the pre-linked mechanism (PLM). This system, but still event-driven system in the native mechanism has been proved to be resources efficient. scheduling layer. With it, the user application development process can be simplified. TABLE I. COMPARISON BETWEEN EVENT-DRIVEN OS AND MULTITHREADING OS The main structure of this paper is as follows: In section IV, the hybrid HEROS scheduler is presented. In Features Event-driven OS Multithreading OS section V, two kinds of HEROS dynamic memory Scheduling All event handlers All handlers run allocators are discussed. In section VI, the Manner execute one by one concurrently implementation of the software timers is introduced. In Supported, thus the section VII, the HEROS PLM is designed and Preemption Not enable overhead of stack switch exists implemented. From section VIII to XI, a new OS debug Real-time Cannot be Can be well supported method, the related work, the performance evaluation, the response supported well by thread preemption All handlers share Each thread should have conclusion and ongoing work are presented respectively. Stacks one global stack its own private stack Shared among all Computation Divided among all II. BACKGROUND OF WSN OSS handlers in a Resources threads by thread switch In terms of the scheduling policy, the WSN OSs can be cooperative way classified into two types: the event-driven OSs and the multithreading OSs. In the past research work, there exist III. SYSTEM ARCHITECTURE OF HEROS some debates and discussions about these two types of The basic terms in HEROS include the event, event OSs [19-23]. handler and the system process. A. Event-driven WSN OSs Event: Event is a system signal which indicates that the condition to take some system action has been satisfied. SOS and Bitcloud OS are all pure event-driven OSs. In An event can be generated by a key pressing, a wireless these OSs, a set of event handlers are defined, each packet reception, an expired system timer, etc. In HEROS, handler is related to an event. Once an event is triggered, events are classified into three types in terms of their the related handler will be invoked. Each handler runs to emergence: the common events, the hard real-time events completion with respect to each other. The interruption is and the soft real-time ones. enabled during a handler's executing process, but the Common events are the ones which don’t have a strict preemption from one handler to another is not allowed. requirement to the response time, e.g., in the garden Since all the handlers are executed one by one, only one caring applications, when the humidity value of the soil stack is needed and be shared by all the handlers. Thus, decreases to a given level, an event should be triggered to the memory consumption of event-driven system is low. request the operation of opening the hydro valve to water However, the real-time performance cannot be well the flowers. In this case, this event is a common one supported, e.g., after a time-critical event is triggered, it because the response delay of even tens of seconds to it cannot be executed immediately by preempting the can still be accepted.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us