Está en la página 1de 5

The 13th IEEE International Symposium on Consumer Electronics (ISCE2009)

eRTOS : The Low-Power Real-Time Operating System for Wearable Computers


Moon-Haeng Cho Dept. of Computer Engineering Chungnam National University Daejeon, Republic of Korea root4567@cnu.ac.kr Jae-Seok Lim Dept. of Computer Engineering Chungnam National University Daejeon, Republic of Korea jslim@cnu.ac.kr Cheol-Hoon Lee Dept. of Computer Engineering Chungnam National University Daejeon, Republic of Korea clee@cnu.ac.kr

AbstractA wearable computer is a computer that is subsumed into the personal space of the user, controlled by the user, and is always on and always accessible. Therefore, among the most salient aspect of wearable computers should be small form factor and long battery lifetime. In this paper, we have designed and implemented a low-power real-time operating system (called eRTOS) specialized for wearable computers. eRTOS has about 9KB footprint and is equipped with low-power techniques composed of the dynamic power management and the device power management. Experimental results with wearable applications show that we can save energy up to 47 % using the proposed low-power techniques. Keywords-component; Wearable computers, operating systems, Low-power management Real-time

wearable computers. eRTOS has about 9KB footprint and is equipped with the low-power techniques composed of the dynamic power management and the device power management. In the next section, we survey some related works. In Section III, the features of the eRTOS low-power real-time operating system are presented. We conducted some experiments to evaluate the performance and the energy saving capability of eRTOS. The results are given with some conclusions in Section IV. II. RELATED WORKS

I.

INTRODUCTION

Computation and communication systems have been rapidly moving toward mobile and portable systems. In recent years, with continued miniaturization and increasing computation power, we see ever growing use of powerful microprocessors running sophisticated, intelligent control software in a vast array of devices including digital convergence systems such as PDAs (Personal Digital Assistants), PMPs (Portable Multimedia Players), UMPCs (Ultra Mobile Personal Computers). Now, embedded systems have been expanding their application domains digital convergence systems to Next Generation Personal Computers (NGPCs) such as eating personal computers, wearable personal computers [1]. A wearable computer is a computer that is subsumed into the personal space of the user, controlled by the user, and has both operational and interactional constancy, i.e. is always on and always accessible. Most notably, it is a device that is always with the user, and into which the user can always enter commands and execute a set of such entered commands, and in which the user can do so while walking around or doing other activities. Therefore, among the most salient aspect of wearable computers should be small form factor and long battery lifetime. To handle these aspects, wearable computers have to use a specialized real-time operating system which is of small footprint and is equipped with low-power techniques [2-12]. In this paper, we design and implement a low-power realtime operating system called eRTOS designed specifically for

A. Wearable computing Wearable are generally equated with head-up, wearable displays, one handed keyboards, and custom computers worn in satchels or belt packs. Ideally, wearable computing can be described as the pursuit of a style of interface as opposed to a manifestation in hardware. To provide wearable computing, designers must overcome significant challenges. As with any computing system, good software and hardware engineering methodologies enable stable advancement. Indeed, wearable computing has inherited many of the systems issues with which the general computing community grapples. However, wearable represent a current extreme in computing because researchers have not thoroughly studied the areas design tradeoff. Each of these issues is closely related to the others, and a design change to correct deficits in one often affects the others. The most immediately striking challenge is in creating appropriate interfaces for wearable computers. However, the issues of power use, heat dissipation, networking, and privacy provide a necessary framework in which to discuss wearable computing [2-12]. B. Embedded Operating Systems An operating system is the very essence of any embedded design. Embedded operating systems such as C/OS, Nucleus, pSOS, VxWorks, Embedded Linux, WindowsCE are designed for devices with relatively limited resources. C/OS [13, 14] is a fully preemptive kernel written in ANSI C. It can manage up to 64 tasks. It is a scalable kernel, in that the user can select only the kernel features required in the application and leave the rest,

This work was supported by the IT R&D program of MIC/IITA. [2008-F048, Development of Wearable Personal Companion]

978-1-4244-2976-9/09/$25.00 2009 IEEE

1015

thus reducing the amount of memory needed by the system. It provides services mailboxes, queues, semaphores, fixed-sized memory partitions, timerelated functions, etc. Because of its simplicity and lightweight, this kernel is suitable for small embedded systems that require high-performance. On the negative side, there are only 56 user tasks available and all the tasks should have different priorities. VxWorks [15] is a very popular and powerful real-time operating system. It provides preemptive multitasking and high-speed interrupt support. It is a modular and scalable operating system. The kernel provides services such as semaphores, events, mailboxes, queues, memory management, timers, etc. Embedded Linux [17] is designed for devices with relatively limited resources, such as smaller sizes of RAM and much more limited secondary storage. It is also usually purpose-made for the required application and target hardware, and thus attempts to be the optimized form of the Linux kernel for that application. Advantages compared to other embedded operating systems include: the source code can be modified and redistributed; relatively small footprint (a typical installation may require less than two megabytes of memory); no royalty or licensing costs; mature and stable; and a large support base. Windows CE [18] is a variation of Microsoft's Windows operating system for minimalistic computers and embedded systems. It is optimized for devices that have minimal storage (relatively small footprint Kernel may run in under a megabyte of memory). It conforms to the definition of a real-time operating system, with a deterministic interrupt latency. It supports 256 priority levels and uses priority inheritance for dealing with priority inversion.

limited memory size and battery life time, low-processing power. As shown in Fig. 1, eRTOS incorporates major features of a real-time operating system, such as task management and multitask scheduling (1.5KB), memory management (1.5KB), inter-task communication and synchronization (1.2KB), interrupt handling (0.2KB), a timer (1.2KB), and power managers (3.2KB). The low-power management is composed of the dynamic power management and the device power management. The total footprint size of eRTOS is about 9 KB.

Figure 1. Overview of the eRTOS

A. Task management Generally, an application is composed of several independent programs. Each of these independent programs is called a task. Each task runs with its own execution functions, stack region, priority, and time slice. eRTOS is a task based operating system, where the system resources and the address space are shared among tasks, and it provides scheduling methods to solve time constraints of a real-time operating system. Multitasking means that several tasks are simultaneously run on a single CPU. eRTOS supports such multitasking environments. Each task has its own context and the context is saved in the task control block (TCB). The context of a task includes program counter of task, CPU registers, stack and function call, delay timer, time slice timer, task priority. Each task has one of five states as shown in Fig. 2: suspended, ready, running, delayed, and pending states. Once a particular event occurs, the state of a task is changed accordingly. When a task is waiting to get a particular resource, it is possible to set the maximum pending time. In this case, the task is in the state of pending + delayed state. Fig. 3 shows the state transition of tasks by events. Once a task is created, it goes into the suspend state. When a created task is activated, it goes into the ready state. A task can be deleted from any of the five states.

Table 1 shows comparisons about footprint size and the presence of any low-power management techniques among them [13-19].
TABLE I. C/OS Size (KB) Low power 12 No COMPARISON OF FOOTPRINT SIZES AND LOW POWER
TECHNIQUES OF OPERATING SYSTEMS

Nucleus 74.2 ~92.5 No

pSOS 49.5 No

VxWorks 286 No

embedded Linux 1~2MB Yes

Windows CE 1MB Yes

III.

ERTOS

The implemented eRTOS have been ported on wearable personal gateway board (WPGB) of watch type wearable computer. WPGB has hardware constraints of small-sized memory (less than 1MByte SDRAM) and limited battery life time, embedded microprocessor with low-processing power (less than 400MHz). eRTOS is a small real-time operating system designed specifically for wearable computers with

Figure 2. Task state transition diagram

1016

The RTOSs real-time scheduler and task management service should guarantee real-time deadlines. Also, real-time kernel services should be deterministic by specifying how long each service call will take to execute. Having this information allows the application designers to better plan their application software [27-28]. eRTOS has 28 priorities from 0 to 27 for tasks and the ready list is managed on the basis of each priority. The scheduler finds the highest priority in the ready list and then transfers the CPU control to the highest priority task. B. Memory Management Dynamic memory management algorithms play an important role in the modern software engineering paradigms and techniques. Using dynamic memory management increases the flexibility and functionalities of applications. The goal of these algorithms is to provide dynamically to the applications the amount of memory required at run time. In general, these algorithms are designed to provide good average response times, whereas real-time applications will require instead the response times of the memory allocation and deallocation primitives to the fast response times [29-31]. eRTOS provides a heap storage manager for dynamic memory management (see Fig. 3). The heap storage manager uses the algorithm with address ordered first-fit memory management for fast response times.

D. Inter-task communication eRTOS provides various inter-task communication methods such as: shared memory which uses global variables; semaphores which provide synchronization and mutual exclusion against access to shared resources; message ports, and task ports which deliver messages among tasks. When a message is sent to a task or tasks, message ports deliver a message pointer to reduce copy over head for delivering message (see Fig. 4).

Figure 4. Message ports.

Task ports provide one-to-one communication among tasks (see Fig. 5). It is implemented using a field of task the control block (TCB) rather than a separate data structure, and it is used for sending short messages among tasks.

Figure 5. Task ports. Figure 3. Heap manager

C. Semaphore Semaphores are important means to satisfy the requirements of mutual exclusion and inter-task synchronization. A semaphore manages shared resources through mutual exclusion so it is more effective than interrupt or scheduling locks. There are three kinds of semaphores. Binary semaphore: A binary semaphore can take on one of only two values (usually values 0 and 1). The binary representation is all that is required to provide mutual exclusion protection for a critical section. Binary semaphores are therefore the most commonly used of the semaphore forms. Mutual exclusion semaphores: As a special case of binary semaphore, it serves as a key to access a shared resource. Counting semaphores: A counting semaphore can take on any value between 0 and an upper integer value. Counting semaphores are normally used for synchronization purposes when counting out resources in use.

E. Low-power management eRTOS is ported on low-power management to enabling aggressive power management strategies that encompass the entire system. The low-power management is composed of the dynamic power management and device power management.

Figure 6. Power manager and operating state transition diagram

1017

Fig.6 shows a high-level overview of our dynamic power management architecture (DPM). DPM policy managers implement user-defined and application specific power management strategies. They may be very active, responding in real time to changes in application power/performance requirements, or may be more passive, for example by changing policies on a longer timescale in response to changes in available battery power. In power management, state transitions are controlled by commands issued by the DPM manager of eRTOS that observes the workload and the battery charge state of the system and decides when and how to force power state transitions. IV. EVALUATION

To evaluate power efficiency, we ported eRTOS on the WPGB with the DPM policies shown in Table 2 and measured the power consumed while running WPGB applications programs: gesture recognition and finger tab, clock. The WPGB platform is composed of a i.MX21 (ARM926-EJ, Max:266MHz, Min:66MHz)[20], a 1-MB SDRAM, a OLED display, a 4-MB NAND flash memory, USB and other peripherals. Fig.8 shows the current level profiles for the corresponding policies and applications. The average current levels are summarized in Table 3.
TABLE II. CPU OPERATING FREQUENCY AND VOLTAGE STRATEGY Gesture task Workload High 266/133 (1.6V) 266/133 (1.6V) 133/88 (1.525V) 133/33 (1.45V) Fingertap task Workload Mid 266/133 (1.6V) 266/133 (1.6V) 133/66 (1.5V) 133/16 (1.45V) Clock task Workload Low 266/133 (1.6V) 266/133 (1.6V) 133/33 (1.45V) 88/33 (1.425V) Idle task Idle 266/133 (1.6V) 133/66 (1.5V) 133/16 (1.45V) 66/16 (1.425V)

For performance evaluation, we implemented eRTOS on the WPGB evaluation platform (i.MX21 with ARM926EJ core developed by Freescale) and measured some of the primitive real-time operating system performance characteristics. Also, to evaluate power efficiency, we measured the power consumed while running WPGB applications programs: gesture recognition and finger tab, clock. One of the significant overheads introduced by a real-time operating system is the scheduling overhead. For performance evaluation, we show the scheduling and inter-task communication overhead. Fig. 7 shows the scheduling overhead of eRTOS and C/OS. Here, the scheduling overhead is the sum of the context switch time, the time to insert a task into the ready queue, and the time to select the highest-priority task. As shown in Fig.7, the real-time scheduler of eRTOS is more efficient than the C/OS.

Default Battery High (Idle scaling) Battery Low (Load Scaling) Battery Critical (Load Scaling)

(a) Default

Figure 7. Scheduling overhead

eRTOS provides various mechanisms for inter-task communication, such as message ports, and task ports. The message ports and task ports just transfer the pointer of a message, therefore their performance does not depend on a message size. The message ports overhead is 357.8s and task ports overhead is 48.53s. The overhead of the task ports is the lowest since it makes use of a field in the TCB data structure. However, it should be noted that the task ports can transfer only one message for each communication round. In order to measure the power consumption, we measured the current of the system using Agilent 34411A digital multimeter (in 1500samples/sec) and Agilent E3648A power supply.

(b) Battery High

(c) Battery Low

1018

would like to explore of memory-aware low-power technique and power-aware OLED management for eRTOS. REFERENCES
[1] K. G. Shin and P. Ramanathan, Real-time computing: a new discipline of computer shtcience and engineering, Proc. of the IEEE, vol. 82, no. 1, Jan. 1994, pp. 6-24. G.Kortuem, Z. Segall, and M. Bauer, Context-Aware, Adaptive Wearable Computers as Remote Interfaces to Intelligent Environments, Proc. IEEE Intl., Symp., Wearable Computers(ISWC), IEEE CS Press, pp.58-65, 1998. T. Starner et al., Augmented Reality Through Wearable Computing, Presence, vol.6, no. 4, pp. 386-398, 1997. T. Trarner, The challenges of wearable computing: Part 1, Micro, IEEE, Vol. 21, pp.44-52, 2001. T. Trarner, The challenges of wearable computing: Part 2, Micro, IEEE, Vol. 21, pp.54-67, 2001. M. Bilinghurst et al., A Wearable Spatial Conferencing Space, Proc. Intl., Symp., Wearable Computers, IEEE CS Press, pp. 76-83, 1998. Marcus T. Schmitz, Bashir M. and Al-Hashimi, System-Level Design Techniques for Energy-Efficient Embedded Systems, Kluwer academic publishers, Boston, 2004. IBM and MontaVista Software, "Dynamic Power Management for embedded systems," http://www.research.ibm.com /arl/projects/dpm.html, Nov. 2002. B. Brock and K. Rajamani, "Dynamic Power Management for Embedded Systems", Proc. of IEEE Intl SoC Conf. (SoCC 2003), pp.416-419, Sep. 2003 L. Benini and G. De Micheli, Dynamic Power management: design techniques and CAD tools, Kluwer academic publishers, 1997 P. Pillai and K. G. Shin, Real-time dynamic voltage scaling for lowpower embedded operating systems, in Proc, 18th ACM symp. Operating Systems Principles (SOSP), pp.89-102, 2001. S. Lee and T. Sakurai, Run-time voltage hopping for low-power realtime systems, in Proc. Design Automation Conf., pp.806-809, 2000. Jean J. Labrosse, C/OS: The Real-Time Kernel, R&D Publications, Lawrence, 1993. Jean J. Labrosse, "C/OS II: The RealTime Kernel 2nd Edition", R&D Publications, Lawrence, 2002. VxWorks & pSOS, http://www.windriver.com Nucleus, http://www.atinucleus.com Windows Embedded CE, http:\\www.micorsoft.com Embedded Linux, http:\\www.linuxfoundation.org RTOS Analysis, http:\\www.realtime-info.be i.MX21 Application Processor Reference Manual, 2, Freescale, 2005

[2]

(d) Battery Critical Figure 8. Current level profiles

[3] [4] [5] Battery Critical 0.077A 47% [8] [6] [7]

TABLE III. default Average current Energy saving 0.146A 0%

AVEAGE CURRENT VALUES Battery High 0.140A 4% Battery Low 0.085A 42%

Since the supplying power at each instant is proportional to the current level at that instant, the total energy consumed during a given time interval is proportional to the average current level during the interval. Therefore, Table 3 demonstrates that, using the low-power policy (such as Battery Low and Battery Critical), we could save energy consumption by about 42% and 47% for the WPGB applications, respectively. V. CONCLUSIONS

[9]

[10] [11]

[12] [13] [14] [15] [16] [17] [18] [19] [20]

In this paper, we introduced the eRTOS low-power realtime operating system for wearable computers. Performance evaluation demonstrated that eRTOS with a footprint size of 9KB is quite efficient, especially for small and batterypowered wearable computers. For energy savings, we incorporated the low-power management which is composed of dynamic power management and device power management scheme. Experimental results with wearable applications show that eRTOS could achieve energy savings up to 47% using the low-power management. In the future, we would like to further adjust eRTOS for task sets typically found on wearable applications. Also, we

1019

También podría gustarte