Operating in a new environment

4 min read

The Internet of Things is posing challenges to OS developers. How are they responding? By Graham Pitcher.

Although the concept of the IoT was floated around the turn of the Millennium, it is only recently that the approach has gathered significant momentum. But, because it is a blanket term, IoT is not only being applied to large and small applications alike, it is also being applied in a wide range of end markets. With such a spread, it will come as no surprise to discover that one size does not fit all when it comes to operating systems.

At the high end of the market, companies like Intel are vying to provide a complete solution. Alongside its processor technology, Intel can integrate Wind River's VxWorks operating system and McAfee security software to create a system capable of handling high levels of complexity.

But those developing wearable devices, for example, may not want to take advantage of such a system; they may well be looking for an OS that runs in a very small footprint but, nonetheless, offers a range of necessary features while consuming minimal amounts of power.

ARM has had its eyes on the sector for some time and, last year, rolled out a significant extension to its mbed programme. Previously, mbed was an embedded development community with ambitions similar to those of Arduino and Raspberry Pi. But mbed now has a much bigger vision – the IoT.

As part of this approach, it is creating mbed OS. ARM says this is a full stack OS designed specifically for use with MCUs based on its Cortex-M core. It says the OS will be optimised for energy efficiency, connectivity and security and will feature reusable software components.

But mbed OS is still in the development process. According to the mbed website, the OS is currently at release alpha 2 and about a year away from a stable version that will be generally available.

Krisztian Flautner is general manager of ARM's IoT business unit. He explained the thinking behind the mbed approach. "Everybody is talking about the IoT, but it's difficult to do well. We want to accelerate deployment and provide a productive environment with a focus on problems.

"Part of this effort is on components which solve bigger problems; solutions that cut across market segments and which have a lot of commonality."

Flautner says mbed OS is 'efficient', with provisioning management. "It's about the ease of use of software components, as well as their ease of reuse. It's an event based system that wakes up when needed. It has built in security and support for important connectivity standards."

He admits it took some time to get the components together, even in advance of mbedOS' launch in October 2014. "The starting point was to see how difficult it was to do things right. Because of this, it has taken time."

The OS comes with a range of security features – including the Datagram Transport Layer Security (DTLS) and Transport Layer Security (TLS) – plus cryptographic capabilities. ARM says this brings 'banking class, end to end security'.

In terms of connectivity, the OS supports Bluetooth LE, Wi-Fi, 6LoWPAN and Thread. Also supported are 2G and 3G cellular comms, plus ZigBee and Ethernet. "Connectivity has been done in a serious way," Flautner asserted. "It's about the internet protocols designed to support these devices."

However, the OS is currently being targeted only at MCUs based on ARM's Cortex-M cores. Flautner explained the thinking: "We see an OS for Cortex-M based MCUs as being the greatest need because, if you build a system around an M class MCU, you usually don't need DRAM."

The configurable OS is planned to be made available free of charge and should appear early in 2016. When it does, it's likely to require a footprint of less than 128kbyte. "If you don't need a particular feature," said Flautner, "you can take it out. The OS is built around event driven low power operation with security."

Express Logic is one OS developer taking a serious interest in the mbed OS. It claims its ThreadX RTOS and the NetX Duo IPv6 network stack will complement mbed OS, bringing what it says will be 'full RTOS capabilities and advanced networking to applications seeking robust RTOS functionality'. Importantly, it also claims the OS will 'future proof' designs.

According to the company, whilst mbed OS includes a basic non preemptive scheduler with limited synchronisation and communication primitives, ThreadX provides a route for developers who need fully preemptive scheduling

"ThreadX RTOS complements the mbed OS platform by adding full RTOS multitasking and services for real time applications," said Bill Lamie, the company's president. "IoT devices, by their very nature, have complex networking requirements [and] ThreadX is already used by developers of ARM based IoT systems. We are excited to extend these already proven IoT solutions to the mbed OS development community."

While ARM and Express Logic come at the IoT OS challenge from a corporate angle, others are developing solutions using a community based approach. Included amongst these are Riot and TinyOS.

Riot, which has its roots in an OS developed in 2008 for use with wireless sensor networks, describes itself as 'the friendly OS for the IoT' – its website (riot-os.org) says it is developer friendly, resource friendly and IoT friendly. A microkernel architecture provides robustness, real time capabilities and energy efficiency.

The OS is said by its developers to have a low memory footprint and to allow programmers to develop applications on typical IoT devices, so long as they have some POSIX and Linux experience. Once written, the code can run on a range of MCUs. Amongst features claimed for the OS are support for C and C++, multithreading, the ability to run without the need for a memory management unit and modularity. Real time capabilities are claimed because the OS has a latency of less than 50 clock cycles, as well as priority based scheduling.

The OS has been developed as open source software and is distributed under the terms of the GNU Lesser General Public License.

TinyOS, meanwhile, is another open source operating system designed for low power wireless devices. Said to be suited to applications such as sensor networks, personal area networks, smart buildings and smart meters, TinyOS provides software abstractions of the underlying device hardware.

TinyOS supports a number of MCU families and radio chips and there is said to be a significant body of robust and efficient code. However, at the moment, the OS does not support Cortex-M3 based MCUs, although work is said to be underway to remedy this. But the OS is said to be useful for MCUs with very small memories.

Flautner concluded: "We have been thinking about the IoT, researching the technology and making acquisitions. Everyone has been talking about the IoT, but it has proved difficult to do well. We want to accelerate deployment of the IoT by providing a productive environment."