Operating System for IOT
Operating System
An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers.
Important functions of an operating System
- Memory Management
- Processor Management
- Device Management
- File Management
- Security
- Control over system performance
- Job accounting
- Error detecting aids
- Coordination between other software and users
What is an IOT 🤔?
The Internet of Things (IoT) describes the network of physical objects—“things”—that are embedded with sensors, software, and other technologies for the purpose of connecting and exchanging data with other devices and systems over the internet. These devices range from ordinary household objects to sophisticated industrial tools. With more than 7 billion connected IoT devices today, experts are expecting this number to grow to 10 billion by 2020 and 22 billion by 2025.
Discussion
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, simplifies the job of application programmers and system integrators because many of the low-level challenges are taken care of by the OS.
As a thumb rule, 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.
Why use separate OS for IoT? The physical size of IoT devices is becoming increasingly smaller; some are even required to be wearable. These physical parameters put significant constraints on the hardware—and hence—the software.
An IoT OS is considered successful when it can be embedded within an internet-connected device, run software, and process and store data on the host IoT device without breaking too much of a sweat.Embedded IoT electronics can get really tiny and OSs follow suit An Overview of How IoT Operating Systems Work? Not unlike a standard OS that you would find on a desktop or laptop computer, the IoT operating system is the brain and central system of the device.
The role of embedded operating systems is to manage all the hardware and software on the device itself, and to allocate all the device’s resources that it needs for functionality, such as processing, memory, and storage. It is the IoT OS that also enables a device to communicate with cloud computing services.Once the data reaches the remote server, the software on the other end processes it based on the use case and produces whatever it was developed to do. Based on the output of this processing, the remote server may send a signal back to the IoT device to request additional data. 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.
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.
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.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 certifications might an IoT OS require? This is dependent on the vertical. The following is a non-exhaustive list:
- DO-178B for avionics systems
- IEC 61508 for industrial control systems
- ISO 62304 for medical devices
- SIL3/SIL4 IEC for transportation and nuclear systems
- 5 Best IoT Operating Systems in 2021
IoT Operating System #1: Contiki
Contiki is an operating system often compared to Microsoft Windows and Linux, but it was designed with a special focus on the nuances of networked, memory-constrained systems (i.e. most IoT devices).
IoT Operating System #2: FreeRTOS
IoT Operating System #3: Mbed OS
IoT Operating System#4: Mi-Python
MicroPython is a very compact, open-source reimplementation of the Python programming language with a focus on microcontrollers.
IoT Operating System #5: Em- Linux
Embedded Linux is built for embedded devices, and it uses a slightly-modified version of the Linux kernel. The smaller size and power of Embedded Linux facilitates the integration of all requirements of IoT devices, so you will find that it's useful for navigational devices, tablets, wireless routers, and more.
- Popular IoT OS Statistics
From the IoT Developer Survey 2018 conducted by Eclipse Foundation, it was found that 71.8% of the respondents like or use Linux-based OS. Within Linux, Raspbian takes the lead. Windows and FreeRTOS follow at 22.9% and 20.4%. However, the sample size in this survey was small.
It's interesting that 19.9% of developers prefer bare-metal programming. Bare-metal is a term that's used when no OS is used. Bare-metal is preferred for constrained devices. It's a cheaper option but development and support costs may increase. If the device's processing, memory and power requirements can allow it, Embedded Linux is preferred. It will have a shorter time-to-market, better security, wider support base and well-tested connectivity solutions.
Comparison Table As A Quick Recap
IoT Operating System | Features | Use cases |
---|---|---|
Contiki NG | Open-source, free | Networked memory-constrained systems |
FreeRTOS | Open-source, free, uses AWS IoT Core | Devices with tiny amounts of memory |
Mbed OS | ARM-based, high-grade security | For portable code |
MicroPython | Uses standard Python, easy to learn, C++ | Rapid deployment |
Embedded Linux | Linux kernel, free | Versatile - can be used for various use cases |
Frequently Asked Questions:
What is an IoT operating system?
An IoT operating system is a hardware-level software designed to process the activity of smaller IoT devices with restrictions on memory, size, and processing power, enabling them to communicate with other devices and systems such as cloud platforms and services.
Do IoT devices have an operating system?
Yes. IoT operating systems are embedded within IoT devices and connect to a greater network of devices. An IoT operating system performs functionality similar to an OS on a standard computer, but is able to work within the size constraints of smaller IoT devices.
Which IoT device requires an operating system?
Any device that requires the inherent functionality of “running code” that makes the device’s hardware accessible to the device’s software, and the ability of that device to communicate information about it to a cloud service (and/or other IoT devices).
What's the best IoT operating system?
We're confident in the 9 operating systems discussed in the blog post. The key factors to consider when determining which is best is compatibility, simplicity, and consistency. There is no single best IoT operating system to use; you have to consider your project requirements.
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteClean and Clear ⚡⚡
ReplyDeleteVery informative blog
ReplyDeleteVery Informative 💯
ReplyDeleteWonderful 💯
ReplyDeleteKamaal
ReplyDeleteKamaal lajawaab bemisaal
ReplyDeleteExcellent in very simple words explaination is given.
ReplyDeleteVery Informative! 💯
ReplyDeleteThank you All!!
ReplyDeleteVery informative
ReplyDeleteVery important
ReplyDeleteImportant and interested
ReplyDeleteExcellent
ReplyDeleteExcellent
ReplyDeleteCan you add videos in this blog..
ReplyDeleteNicely structured, informative blog ,full of knowledge and this blog includes much more points to attract.
ReplyDeleteAmazing
ReplyDeletePrecise and informative!
ReplyDeleteVery well written!
ReplyDeleteSimple and nicely structured format .so that anyone can understand .
ReplyDelete👍
Very Informative 💯
ReplyDelete👏👏
ReplyDeleteInformative and elaborated well
ReplyDeleteOne of the important topic in really understandable manner 👍
ReplyDeleteHelpful.
ReplyDeletevery well explained...
ReplyDeleteHelpful and very well explained
ReplyDelete