Lightweight Event-driven Real-time Operating System for Resource Constrained Connectivity
Juven, Ville (2017)
Juven, Ville
2017
Information Technology
Tieto- ja sähkötekniikan tiedekunta - Faculty of Computing and Electrical Engineering
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2017-06-07
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tty-201705171411
https://urn.fi/URN:NBN:fi:tty-201705171411
Tiivistelmä
Wirepas Connectivity (WPC) is a complex protocol stack for large scale mesh-based Internet of Things (IoT) networks. The communication units in a WPC network are called nodes and these are designed to be cheap, resource constrained and battery operated. In contrast, each node requires several levels of parallel and real-time processing, which is best provided by a Real-Time Operating System (RTOS).
The resource constraint aspect places requirements for the RTOS design. The RTOS kernel should take less than 10 kB of program memory and under 1 kB of data memory. It must be energy efficient for battery operation and for this reason its scheduling must be tickless (as opposed to time-sharing). Furthermore, the WPC protocol stack requires deterministic real-time timings with microsecond accuracy from the RTOS.
This thesis studies the feasibility of related RTOSs Contiki, TinyOS, µC/OS and FreeRTOS for WPC use. The study shows that none of the related RTOSs are feasible without major modification. Contiki and TinyOS would complicate software development. µC/OS is commercially licensed and would increase per node cost. FreeRTOS lacks sufficient real-time operation for WPC. Furthermore, these RTOSs are designed to be general purpose and thus they are wasteful with precious memory and energy resources. To better deal with these challenges, a more specific approach is required.
As a solution, this thesis presents a completely new RTOS called WPC-OS, designed specifically for WPC. The RTOS design targets to timing determinism and energy efficiency in all its functions. The WPC-OS scheduler provides a novel and lightweight timetabled scheduling approach, which uses task durations to determine the next task. Event-driven operation is provided on top of this to achieve reactiveness to concurrent events.
For evaluation and measuring WPC-OS design efficiency, it was implemented on an nRF52832 platform. The measurement results show that the WPC-OS kernel achieved a small memory footprint. With the typical WPC node configuration, it uses only 5 kB of program memory and 350 B of data memory. It can handle the WPC timing requirements with its real-time event service, which guarantees 1 us timing accuracy. It provides lightweight multitasking capability for applications, while being energy efficient. WPC-OS solves all design requirements WPC imposes on RTOS design, and is suitable for mass production. As future work, coroutine and hybrid scheduling options for WPC-OS should be investigated.
The resource constraint aspect places requirements for the RTOS design. The RTOS kernel should take less than 10 kB of program memory and under 1 kB of data memory. It must be energy efficient for battery operation and for this reason its scheduling must be tickless (as opposed to time-sharing). Furthermore, the WPC protocol stack requires deterministic real-time timings with microsecond accuracy from the RTOS.
This thesis studies the feasibility of related RTOSs Contiki, TinyOS, µC/OS and FreeRTOS for WPC use. The study shows that none of the related RTOSs are feasible without major modification. Contiki and TinyOS would complicate software development. µC/OS is commercially licensed and would increase per node cost. FreeRTOS lacks sufficient real-time operation for WPC. Furthermore, these RTOSs are designed to be general purpose and thus they are wasteful with precious memory and energy resources. To better deal with these challenges, a more specific approach is required.
As a solution, this thesis presents a completely new RTOS called WPC-OS, designed specifically for WPC. The RTOS design targets to timing determinism and energy efficiency in all its functions. The WPC-OS scheduler provides a novel and lightweight timetabled scheduling approach, which uses task durations to determine the next task. Event-driven operation is provided on top of this to achieve reactiveness to concurrent events.
For evaluation and measuring WPC-OS design efficiency, it was implemented on an nRF52832 platform. The measurement results show that the WPC-OS kernel achieved a small memory footprint. With the typical WPC node configuration, it uses only 5 kB of program memory and 350 B of data memory. It can handle the WPC timing requirements with its real-time event service, which guarantees 1 us timing accuracy. It provides lightweight multitasking capability for applications, while being energy efficient. WPC-OS solves all design requirements WPC imposes on RTOS design, and is suitable for mass production. As future work, coroutine and hybrid scheduling options for WPC-OS should be investigated.