# Comparison of IoT constrained devices operating systems : A Survey ## Abstract RTOS's are often considered for embedded systems because traditional GPOS's take to many resources, and embedded systems are often resource contrainted. This thesis will compare different RTOSes with respect to scheduling, real-time capabilites, programming model, memory, footprint, network connectivity, hardware support and energy efficiency. the RTOSes compared are - FreeRTOS - Mbed - Contiki - TinyOS - RIOT ## Introduction They talk about IoT systems as systems equipped with data sensing, analysis and communication capabilites using internet protocols. The OS will act as a resource manager for these systems allowing for more complexity. They also state that systems using commercial and non-commercial OS's increased from 11B to 17.6B units in a time span of five years 2014 - 2019. However according to the thesis more than 70% of IoT devices use some kind of Linux distro. > A note to be made is that Zephyr was not yet fully commercialized when this study dropped. ## Major Concerns in IoT OS Design The kernel is the most essential part of an OS. Which is what we should take into consideration when choosing an RTOS (Zephyr), as the kernel holds the drivers for various hardware. ### Architecture According to the thesis, the most well known RTOS architectures are monolithic and microkernel. Monolithic architectures are non-structured. > it is a single large process running entirely in a single address space. Its services are implemented separately and each service provides and interface for others. Later compiled into one system image. A micro-kernel on the other hand, has a minimalistic kernel. A minimalistic kernel contains several processes which runs parallell in the kernel space and user space. According to the study a monolithic OS is hard to understand and modify and difficult to maintain which makes it a poor choice for IoT devices. ### Scheduling & Real-time capabilities A vital part of any RTOS is its scheduling design. Most RTOSes uses some form of Preemptive scheduling. According to the thesis, the scheduling algorithm improves energy efficiency, real-time capabilities, system performance and latency. ### Programming model Most common programming models for low-end IoT systems are event-driven and miltithreaded systems. I think that XEN is event-driven for example. For event-driven systems, tasks can only be triggered by external events for example Interrupts. They share a common-stack model and a simple event loop instead of a more complex scheduler. Multithreaded systems instead gives opportunity to run each task in its own thread context, and uses Inter task communication mechanisms (APIs) to communicate. This is what we know as semaphores, mutexes, message queues etc. ### Memory footprint Here they talk about the resource constraints for IoT devices, separating them into three classes C0, C1, C2 based on their RAM and ROM size. However, they do not cover 64 bit architectures as the ACU6. ### Network Connectivity & Protocol support Basically just stating how important certain network protocols such as BLE, Ethernet, IPV6 and so on are mandatory for IoT systems. We know that Zephyr supports all this, and that it on top of that support CAN which is used in automotive industry. ### Hardware support Nothing special. ### Energy Efficieny Not so relevant for us either. ## IoT OS Comparison The RTOSes that they have chosen for comparison are based on Eclipse developer surveys. ### General All OSes are Open Source. This could also be a key point for us. ### Architecture Here they just state which architecture (monotholic) or (microkernel) that the chosen RTOSes are based on. ## The rest of the article They just continute to compare the OSes to eachother with respect to the stuff stated above. They later draw a conclusion that FreeRTOS is the best for low-end IoT devices.