IoT operating systems
The use of operating systems for IoT hardware is often categorized into two groups: end devices and gateways. End devices or nodes are often lot smaller in capability as compared to gateways. As more and more processing is pushed to the network edges (to gateways and nodes), traditional devices that used to run without an OS are embracing new OS implementations customized for IoT.
While IoT OS are an evolution of embedded OS, IoT brings its own additional set of constraints that need to be addressed. A mix of open source and closed source IoT OS exist in the market. Since IoT is varied in terms of applications, hardware and connectivity, we expect the market will sustain multiple OS rather than just a couple of them.
Do IoT end devices require an OS in the first place?
While having an OS is not mandatory, devices are growing in complexity. This complexity is due nodes having more sensors, more data processing and increased connectivity to send that data out. Some devices have rich user interfaces that might include graphical displays, face recognition and voice recognition. End devices that were often based on 8-bit or 16-bit MCUs are moving to 32-bit architectures as costs drop and complexity increases. Addressing these changes without an OS is not only a challenge but also inefficient. The use of OS, particular an RTOS, simplies the job of application programmers and system integrators because many of the low-level challenges are taken care of by the OS.
As a thumbrule, a system that consumes less than 16KB of RAM and Flash/ROM does not require an OS. Such systems most often run on 8-bit or 16-bit MCUs. With such systems, we can get away with a single event loop that polls and processes events as they occur. But if more complexity is added to the system, the response times will be limited by the worst-case processing time of the entire loop.
What are the parameters for selecting a suitable IoT OS?
The following parameters may be considered for selecting an IoT OS:
- Footprint: Since devices are constraint, we expect OS to have low memory, power and processing requirements. The overhead due to the OS should be minimal.
- Scalability: OS must be scalable for any type of device. This means developers and integrators need to be familiar with only one OS for both nodes and gateways.
- Portability: OS isolates applications from the specifics of the hardware. Usually, OS is ported to different hardware platforms and interfaces to the board support package (BSP) in a standard way, such as using POSIX calls.
- Modularity: OS has a kernel core that's mandatory. All other functionality can be included as add-ons if so required by the application.
- Connectivity: OS supports different connectivity protocols, such as Ethernet, Wi-Fi, BLE, IEEE 802.15.4, and more.
- Security: OS has add-ons that bring security to the device by way of secure boot, SSL support, components and drivers for encryption.
- Reliability: This is essential for mission-critical systems. Often devices are at remote locations and have to work for years without failure. Reliability also implies OS should fulfil certifications for certain applications.
What parameters are important for selecting a suitable IoT OS?
The short answer is that there's no universal subset of important parameters. While there are many parameters for selection, some of them may be more important than others depending on the hardware type and application. For example, a small memory footprint may be important for end devices but not so for gateways. Compliance to standards may be important for an industrial application but not so for a hobby project. Someone looking at only ARM-based hardware might choose ARM mbed at the expensive of platform portability. A device that has access to a power supply might not expect power optimization from its OS; whereas a battery-powered device might expect the OS to do power management so that the battery can last for 10 years.
What certifications might an IoT OS require?
- DO-178B for avionics systems
- IEC 61508 for industrial control systems
- ISO 62304 for medical devices
- SIL3/SIL4 IEC for transportation and nuclear systems
What are the open source IoT OS?
The following is a non-exhaustive list: TinyOS, RIOT, Contiki, Mantis OS, Nano RK, LiteOS, FreeRTOS, Apache Mynewt, Zephyr OS, Ubuntu Core 16 (Snappy), ARM mbed, Android Things, Yocto, Raspbian.
Some of these have come from academic institutions. TinyOS and Contiki are among the oldest. RIOT is more recent and has an active community of developers. FreeRTOS is among the popular ones. LiteOS is from Huawei. ARM mbed is single-threaded, event-driven and modular. It's has good connectivity and low footprint. In Zephyr OS the kernel is statically compiled, which makes it safe from compile time attacks. With Ubuntu Core, rather than having a monolithic build, kernel, OS and apps are expected be packaged and delivered as snaps. Android Things, previously named Brillo, is Google's offering. Yocto is not exactly an embedded Linux distribution. It's a platform to create a customized distribution for your particular application.
What are the closed or commercial IoT OS?
The following is a non-exhaustive list: Windows 10 IoT, WindRiver VxWorks, Micrium µC/OS, Micro Digital SMX RTOS, MicroEJ OS, Express Logic ThreadX, TI RTOS, Freescale MQX, Mentor Graphics Nucleus RTOS, Green Hills Integrity, Particle.
Windows 10 IoT comes in three flavours: IoT Enterprise, IoT Mobile Enterprise and Core. TI RTOS and Freescale MQX target the respective chipsets. Where reliability and safety are important, some of these commercial systems are preferred, particularly in aerospace, automotive, healthcare and industrial systems. Windows 10 IoT and Particle are examples that enable easy integration to cloud services.
Do IoT OS need to be real-time OS?
RTOS will be required where data has to be processed within time constraints, often without buffering delays. Where multiple threads are required that have to meet deadlines and share resources effectively, RTOS will be needed.
There will also be a class of devices that may not have strict real-time constraints. For some, a richer user interface may be more important. Some may buffer data and transmit them occasionally to save power. Such devices need not have an RTOS and may adopt a simpler OS. However, a survey from 2015 has shown that many designers who choose an OS mention real time as one of the top reasons.
Designers may choose to use multiple processors where it makes sense. For example, an 8-bit MCU may be used to interface to sensors and actuators; a 32-bit processor will run the RTOS for connectivity and multithreading.
What are typical memory requirements for IoT OS?
Sensor nodes will have less than 50KB of RAM and less than 250KB of ROM. Contiki requires only 2KB of RAM and 40KB of ROM. Similar numbers are quoted for Mantis and Nano RK. Zephyr requires only 8KB of memory. Apache Mynewt requires 8KB of RAM and 64 KB of ROM. It's kernel takes up only 6KB. Communication protocols typically take up 50-100KB of ROM.
In all cases, the numbers will increase when more components are added as required by the application. For example, one experiment with SMX RTOS showed 40KB/70KB of RAM/ROM for a node; the same OS for an gateway came up to 200KB/300KB.
Devices based on Ubuntu Core, Windows 10 IoT, Android Things and MicroEJ are likely to require memories in the order of gigabytes. Gateways will typically have a footprint in the order of gigabytes. This is because of extra functionality that they are require to do: device management, security, protocol translation, retransmissions, data aggregation, data buffering, and so on.
What design techniques are used by IoT OS?
TinyOS and ARM mbed use a monolithic architecture while RIOT and FreeRTOS use a microkernel architecture. ARM mbed uses a single thread and adopts an event-driven programming model. Contiki uses protothreads. RIOT, FreeRTOS and µC/OS use a multithreading model. In static systems (TinyOS, Nano RK), all resources are allocated at compile time. Dynamic systems are more flexible but also more complex. File systems may not be required for the simplest sensor nodes but some OS support single level file systems. With respect to power optimization, this is done for the processor as well as its peripherals.
- Arrow. 2016. "IoT Operating Systems." Arrow. September 13. Accessed 2017-03-13.
- Baccelli, Emmanuel, Oliver Hahm, Hauke Petersen, and Kaspar Schleiser. 2015. "RIOT and the Evolution of IoT Operating Systems and Applications." ERCIM News. No. 101, April. Accessed 2017-03-20.
- Dong, W., C. Chen, X. Liu, and J. Bu. 2010. "Providing OS Support for Wireless Sensor Networks: Challenges and Approaches." IEEE Communications Surveys & Tutorials, vol. 12, no. 4, pp. 519-530.
- Froehlich, Andrew. 2016. "8 IoT Operating Systems Powering The Future." InformationWeek. January 3. Accessed 2017-03-13.
- Guinard, Dominique. 2016. "Operating Systems for IoT Embedded Systems." Web Of Things. December 12. Accessed 2017-03-13.
- Hemos. 2003. "The Contiki Desktop OS for C64, NES, 8-bit Atari." Slashdot. March 10. Accessed 2017-03-13.
- Lamie, William. 2015. "The Benefits of RTOSes in the Embedded IoT." EE Times. September 14. Accessed 2017-03-13.
- Levis, Philip. 2012. "Experiences from a decade of TinyOS development." Proceedings of the 10th USENIX conference on Operating Systems Design and Implementation (OSDI'12). pp. 207-220. Accessed 2017-03-13.
- Lewis, Brandon. 2016. "Picking a portable Internet of Things operating system." IoT Design. April 1. Accessed 2017-03-13.
- Micrium. 2017. "Part 5: The Internet of Things and the RTOS." IoT for Embedded Systems: The New Industrial Revolution. Accessed 2017-03-13.
- MicroEJ. 2017. Accessed 2017-03-20.
- Piekarski, Wayne. 2016. "Announcing updates to Google’s Internet of Things platform: Android Things and Weave." Android Developers Blog. December 13. Accessed 2017-03-13.
- Postscapes. 2017. "Embedded Operating Systems." IoT Software Development Guide. Accessed 2017-03-13.
- Prakash, Vivek. 2017. "7 open source IoT operating systems That Are Democratizing The IoT Space." Electronics For You. January 18. Accessed 2017-03-13.
- Quinnell, Rich. 2015. "2015 Embedded Markets Study." UBM. Accessed 2017-03-13.
- Quinnell, Rich. 2016. "10 Intriguing Technologies from ARM TechCon: An open source RTOS for the IoT." EE Times. March 11. Accessed 2017-03-13.
- RIOT. 2017. RIOT History. Accessed 2017-03-13.
- Roche, Didier. 2016. "The new Ubuntu Core 16 beta image is out!" Ubuntu Insights. October 7. Accessed 2017-03-13.
- Tarnovskiy, Stan. 2016. "Windows 10 IoT editions explained." Perficient Blog. January 5. Accessed 2017-03-13.
- Tripathi, Saurabh. 2016. "List of Operating Systems for IoT that You Should Know About." IoTLeague. August 16. Accessed 2017-03-13.
- Android Things
- Windows 10 IoT
- Ubuntu Core
- Moore, Ralph. 2012. "How to Pick an RTOS." March 2. Accessed 2017-03-14.
- Baccelli, Emmanuel, Oliver Hahm, Mesut Günes, Matthias Wählisch, and Thomas C. Schmidt. 2013. "Operating Systems for the IoT – Goals, Challenges, and Solutions." ResearchGate. January. Accessed 2017-03-13.
- Cole, Bernard. 2014. "Picking the right RTOS for your next-gen embedded IoT design." Embedded.com. June 30. Accessed 2017-03-13.
- Marchant, Linda. 2016. "Why the Need for Special Operating Systems for IoT and Wearable Devices?" DZone. June 3. Accessed 2017-03-13.
- Chien, T. Vu, H. Nguyen Chan, and T. Nguyen Huu. 2011. "A comparative study on operating system for Wireless Sensor Networks." International Conference on Advanced Computer Science and Information Systems, Jakarta. pp. 73-78. Accessed 2017-03-14.
- Adiga, Ranjit. 2013. "Selecting the right RTOS scheduling algorithms using system modelling." Embedded.com. August 16. Accessed 2017-03-14.