Operating Systems for IoT Devices: A Critical Survey S P EA K E R :李冠 德(Gu an-De L ee) ADV I S O R : 吳和庭(H o-Ting Wu) DAT E : 2015/ 12/ 24 Outline Introduction Desirable features of IOT OS Exiting operating systems Generic model Conclusion Reference Introduction IoT(Internet of Things): Is an integrated system of uniquely identifiable communicating devices which exchange information in a connected network to provide extensive services. Introduction(Cont.) WSN(Wireless Sensor Network) RAM(Random Access Memory) ROM(Read-Only Memory) INTRODUCTION(Cont.) IoT devices are more than mere embedded devices with wireless sensors. IoT is the interconnection of Wireless Sensor Network (WSN) Devices with Internet space. IoT devices generally have scarcity of energy and memory resources. They are generally small and batteryoperated with memory of the order of 100 kilobytes. INTRODUCTION(Cont.) IoT devices are fitted with 8-bit microcontrollers which are far left behind by the present generation Windows/Unix/Mac-based desktops and laptops. The distinct features and constraints of IoT call for an efficient, flexible, portable and light-weight system with low RAM & ROM footprints. DESIRABLE FEATURES OF IOT OS Architecture Programming model Scheduling Networking Memory management Portability DESIRABLE FEATURES OF IOT OS(Cont.) Architecture : Kernel architecture can be monolithic, layered and modular microkernel. Advantage: ◦ smaller memory footprint ◦ less expensive module interaction ◦ performance is higher ◦ system reliability is higher Disadvantage: ◦ the kernel code becomes long and complex DESIRABLE FEATURES OF IOT OS(Cont.) Programming model • • • • • Emory hierarchy and concurrency decide the model to be employed. Affects the system performance and productivity. Best utilize underneath architecture for the applications running on top. The programmers can efficiently use the system Assembly language is the best alternative to interface with the hardware but support to high level languages is required for easy development. DESIRABLE FEATURES OF IOT OS(Cont.) Scheduling Is one of the key factors that decide the system performance. The latency (turnaround time, response time), throughput, fairness and waiting time all depend on the scheduling algorithm. Scheduler should be a real-time scheduler The schedulers should be energy-efficient & multitasking DESIRABLE FEATURES OF IOT OS(Cont.) Networking • • • • The IoT entities should be capable of communicating with low power consumption. Conventional TCP/IP stacks and WSN networking technologies are not suitable for IoT. The IoT stack should be light-weight, reliable and Internet-enabled. Ipv6 is mandatory in IoT systems to have unique identities in tremendously large networks. • 6LoWPAN (Low-power Wireless Personal Area Network over IPV6), RPL (IPv6 Routing Protocol for Low-Power and Lossy Networks) and CoAP (Constrained Application Protocol) are designed for low-power systems. • Header compression and inclusion of minimal features help in keeping the protocols viable for IoT DESIRABLE FEATURES OF IOT OS(Cont.) Memory management • • • • Simple and small kernel is a primary goal. Required depends upon the application type and the support by underlying platform. The memory allocation can be static/dynamic. The static memory allocation is simpler but flexibility of run-time memory requirement can be obtained with dynamic approach. DESIRABLE FEATURES OF IOT OS(Cont.) Portability • • • • • The OS should be easily portable to different hardware platforms. It Should Supports The Large Variety of hardware architectures. The micro-controllers used in IoT range from 8-bit to 32-bit. The OS should be able to leverage the underlying architecture. The OS should be adjustable to the specific needs of the applications and provide reasonable abstraction to the background details. EXISTING OPERATING SYSTEMS Contiki RIOT TinyOS LiteOS FreeRTOS Mantis OS Nano-RK EXISTING OPERATING SYSTEMS(Cont.) SOS NutOS uC/OS-III uClinux OpenTag ErikaEnterprise EXISTING OPERATING SYSTEMS(Cont.) Contiki • Is an open source operating system for networked. • Is a memory-constrained systems with a particular focus on low-power wireless IoT devices. • Examples of where Contiki is used include street lighting systems, sound monitoring for smart cities, radiation monitoring systems, and alarm systems. EXISTING OPERATING SYSTEMS(Cont.) RIOT • Is an open-source microkernel operating system for the IoT. • RIOT is an operating system based on a microkernel architecture. • RIOT's kernel is mostly inherited from FireKernel, a kernel which was originally developed for sensor networks. EXISTING OPERATING SYSTEMS(Cont.) TinyOS TinyOS is a free and open source software component-based operating system and platform targeting wireless sensor networks (WSNs). TinyOS is an embedded operating system written in the nesC programming language as a set of cooperating tasks and processes. It is intended to be incorporated into smartdust. EXISTING OPERATING SYSTEMS(Cont.) LiteOS • LiteOS is a real-time operating system (RTOS). • LiteOS is a Unix-like operating system that fits on memory-constrained sensor nodes. • This operating system allows users to operate wireless sensor networks like operating Unix, which is easier for people with adequate Unix background. • LiteOS provides a familiar programming environment based on Unix, threads, and C. • It follows a hybrid programming model that allows both event-driven and threaddriven programming. EXISTING OPERATING SYSTEMS(Cont.) FreeRTOS • FreeRTOS is a popular real-time operating system kernel for embedded devices, that has been ported to 35 microcontrollers. • It is distributed under the GPL with an optional exception. • The exception permits users' proprietary code to remain closed source while maintaining the kernel itself as open source, thereby facilitating the use of FreeRTOS in proprietary applications. EXISTING OPERATING SYSTEMS(Cont.) Mantis OS • • • • Mantis OS is implemented in C. It has services resembling to a subset of POSIX implementation. Threads are assigned certain priority levels. Within a priority level, Round Robin (RR) scheduling is used. EXISTING OPERATING SYSTEMS(Cont.) Nano-RK • In C-based Nano-RK , tasks follow fixed-priority scheduling. • There are two types of priority scheduling. • In the case of rate monotonic scheduling, tasks are assigned priorities statically depending on the period of the job. • Shorter jobs have higher priorities. • While rate harmonized scheduling is aimed at saving power,tasks are grouped together for execution to eliminate any idle cycles. • Dynamic memory management and MPU are absent. • The OS supports a lightweight protocol stack. EXISTING OPERATING SYSTEMS(Cont.) SOS • • • • SOS has loosely coupled components which are put together at compilation time. SOS is reconfigurable and flexible. It can be modified even after deployment. The OS uses high priority queues to handle time critical messages, interrupts and delay intolerable tasks. • The tasks follow flexible priority scheduling. • SOS uses best-fit fixed block dynamic memory allocation policy. EXISTING OPERATING SYSTEMS(Cont.) NutOS • NutOS has threads that keep on executing until some event occurs or they themselves yield the processor explicitly. • They can be preempted by hardware interrupt and can be unblocked by event. • The best-fit memory allocation scheme is used to dynamically allocate heap memory. • The OS has an enableable option to check memory protection. EXISTING OPERATING SYSTEMS(Cont.) uC/OS-III • MicroC/OS-III is a portable, scalable and ROMable kernel, written in Ansi C, except some context-switching portion which is in assembly. • It has mutual exclusion and semaphore mechanisms for task synchronization. • The tasks are scheduled in RR fashion. • It allows multiple interfaces and multiple IP addresses per interface. EXISTING OPERATING SYSTEMS(Cont.) uClinux • uClinux has evolved from monolithic Linux, the most significant difference is the absence of MMU. • The system has support to user-space and kernel-space, system calls can be used to switch from user to kernel mode. • As the OS is available for modifications, that poses a failure issue. EXISTING OPERATING SYSTEMS(Cont.) OpenTag • OpenTag is a minimal Exokernel RTOS written in C. • The OS is built up on DASH7 monolithic protocol stack which has all 7 OSI layers of OSI, with partial implementation of application layer. EXISTING OPERATING SYSTEMS(Cont.) ErikaEnterprise • ErikaEnterpriseisanOSEK/VDX kernel. • It constitutes of scheduling features like, hierarchical scheduling, periodic and aperiodic scheduling with fixed and dynamic priorities. GENERIC MODEL GENERIC MODEL(Cont.) CONCLUSION IoT has some special features as compared to conventional computing devices. The OS is to be designed according to the distinct requirements of IoT devices and target application areas. Reference Padmini Gaur, Mohit P. Tahiliani . Wireless Information Networking Group (WiNG) NITK, Surathkal, Mangalore, India, 575025 Email: padminig.13is15f@nitk.edu.in, tahiliani@nitk.ac.in