Picking the right RTOS for your next-gen embedded IoT design - Embedded.com

Picking the right RTOS for your next-gen embedded IoT design

For many embedded developers I have talked to, the emergence of the Internet of Things and all that implies about ubiquitous connectivity is a phenomenon that is both puzzling and eye-opening. This is especially true about the building blocks – such as operating systems – that need to be used.

Articles and papers on the many choices facing embedded developers are included in this week's Embedded.com Tech Focus Newsletter. My Editor's Top Picks include:

Providing OS support for wireless sensor networks: challenges and approaches
A comprehensive review of existing work in sensornet (aka IoT) operating system design from the perspective of OS developers and users, and a taxonomy of current sensor OS capabilities and features.

A comparative study on operating systems for wireless sensor networks
An examination and comparison of existing OSes for WSNs, including TinyOS, Contiki, and LiteOS as well as some traditional embedded RTOSes such as VxWorks.

POSIX in the age of IoT computing
The role of the POSIX API in providing a platform-independent means for porting embedded apps between Linux and Unix systems as well as between POSIX-compliant RTOSes.

The current IoT buzz is puzzling to many embedded developers because many of its constituent elements – wireless sensor networks (WSNs), machine to machine (M2M) networking, and real time wireless control networks – are applications with which they have been involved for at least ten years.

For many existing resource-constrained WSN and M2M applications in industry, in the home, in building automation and industrial networks, developers have used familiar and reliable microkernel RTOSes such as Express Logic's ThreadX, Micrium's uCOS, Rowebot's Unisom, Mentor Graphics's Nucleus, and FreeRTOS.

The eye-opening occurs – and some of the differences become clear – when you look at the scale of the networks of devices being considered by corporations wanting to jump on the Internet of Things bandwagon. In earlier years, such networks were in the several hundred to several thousands of nodes in size. Now the number of devices is in the millions, enabled by broader availability of the IPv6 Internet Protocol suite – which has more unique URL addresses than there are things (and humans) in the world.

At that scale, many traditional microkernel-based RTOS solutions that previously were adequate will now have to be re-evaluated and retargeted. Competition will also be fiercer as a new generation of operating systems, such as RIOT, LiteOS, and Contiki, emerge into wider use that are designed to address the specific needs of networks of things on that scale and doing so in real time and deterministic ways.

Also looking to play a role there are a variety of Linux distributions from hardware MCU vendors such as ARM, Texas Instruments, Intel/Wind River and Freescale. They are operating under the assumption that the main IoT CPU of choice will be some form of 32-bit MCU that eventually will drive 8- and 16-bit MCUs from the market, leaving the way clear for Linux and its advantages of software reuse and reduced cost of development.

However, a number of alternatives are now appearing that claim to offer everything that Linux promises but on platforms no bigger than an 8-bit MCU, or at most, a 32-bit ARM Cortex M0, including:

Towards an OS for the Internet of Things
A description of RIOT, an open source, real-time operating system that explicitly considers devices with minimal resources but eases development across a wide range of devices.

LiteOS: Toward Unix-like abstractions for wireless sensor networks
An OS for extremely resource-constrained sensor nodes that supports C programming and provides Unix-like abstractions to wireless sensor networks by mapping a sensor network into a UNIX-like file system.

My guess is that Linux and its variety of microkernel RTOS competitors will segment the market in much the same way as occurred following the emergence of the desktop PC. Then, desktops accounted for the majority of the processor and operating system dollar volume. But on the basis of the number of units sold, though, embedded microcontrollers and RTOSes outnumbered the former by many-fold. And they still do, even with laptops and tablets included.

Similarly, I suspect that Linux will be mainly used in wearable IoT applications associated with the consumer electronics and mobile smartphone market. That is where all the money will be made and where the applications have the memory and processor resources to support the use of Linux. Other than a role on IoT gateways serving the more resource constrained endpoint devices,  much of IoT in other markets in industrial, motor and machine control, and smart grid will be dominated by smaller MCU and RTOS alternatives.

Complicating the equation even further, embedded developers now have a number of ways to bypass the need for an operating system altogether. . Rather than use an RTOS, alternative, approaches now allow either the creation of a customized OS specific to the application needs of an IoT design, or the use of just those OS services specifically needed and that can be squeezed into resource constrained IoT environments. Recent design articles that address such alternatives include:

ASOS: A new software development paradigm for the Internet of Things in whiich Bob Zeidman describes how to synthesize your own application-specific OS to handle many tasks that Internet-of-Things designs require, rather than search for a proprietary or open-source RTOS to do such tasks.

Selecting the right RTOS scheduling algorithms using system modeling where Ranjit Adiga describes how his company did away with the need for a full RTOS implementation by using a hardware/software system modelling tool to build a dedicated scheduler.

Operating system independence by Mike Hogg, on how to manage an operating system dependency behind an OS abstraction layer to allow for easier code re-use in other target environments and hence target flexibility.

What do you think? Is there any fundamental difference between the Internet of Things and the variety of wireless sensor, machine to machine, home and building automation, and industrial network applications that you already build? Differences in type? Differences in scale? Is it forcing you to rethink your OS choices? How much of a factor will Linux play in this market?

Embedded.com Site Editor Bernard Cole is also editor of the twice-a-week Embedded.com newsletters as well as a partner in the TechRite Associates editorial services consultancy. He welcomes your feedback. Send an email to , or call 928-525-9087.

See more articles and column like this one on Embedded.com. Sign up for s ubscriptions and newsletters . Copyright © 2014 UBM–All rights reserved.

5 thoughts on “Picking the right RTOS for your next-gen embedded IoT design

  1. “Much thanks. there are many alternatives out there and it takes ime and effort to look at and evaluate them. And I am not even using them to design with. For embedded developers, the choices and effort it takes must be daunting and is one reason I suspect

    Log in to Reply
  2. “Have you actually looked at RIOT? The best thing you can say about it is they used Doxygen comments in the file headers. There are no function headers and essentially no comments in this code. There is no quality in this “University” code at all. Don

    Log in to Reply
  3. “With the predicted 50 billion IoT devices by 2020, 16% of these devices (8 billion) will be smartphones, tablets, wearables… This is the visible part of IoT and these devices run Linux, Android, IoS…The invisible part, the 42 billion devices that run

    Log in to Reply
  4. “I'm still not seeing any reason to believe that the IoT, if it ever really comes into being, needs any different tools and methodologies than any other embedded systems development.nnAbstraction has been an important concept in software (and system) dev

    Log in to Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.