As the world of IoT gets bigger and bigger, IoT devices are getting smaller and smaller in the form of smart wearables, miniature motion sensors, smart thermometers, and more. Unfortunately, building systems that are suitable for these smaller devices presents certain challenges for developers.

Since IoT devices are generally small and rely on battery power, they need embedded systems that don’t require too much processing power or memory. A real-time operating system (RTOS) fulfills that requirement. Let’s take a look at one of the top RTOS options for smart applications, which is Azure RTOS ThreadX from Microsoft.


Ready to talk to our IoT experts to see what we can do?

Book a consultation today and get help with tech support, business inquiries, and other IoT queries. We are happy to help. Talk to you soon.

Book Consultation

What is an RTOS?

So why is an RTOS so necessary? Well, an RTOS requires less processing power than an OS, making an RTOS perfect for small, resource-constrained devices. Linux, Mac, and Windows are typical OS examples that don’t fulfill the low-power requirements for the average IoT device. They’re too heavyweight, meaning they require too much storage and processing strength. Plus an OS has to use its processing abilities on multiple tasks at the same time, which means all of those tasks will happen more slowly than in a system that dedicates itself to a single task at a time.

A Real Time Operating System (RTOS), by contrast, performs tasks in real time because it switches between tasks and never performs multiple tasks simultaneously. Since an RTOS only performs a single task at a time, it doesn’t require as much processing power, making it ideal for IoT.

Azure RTOS in particular fulfills all the requirements of an RTOS and more. Technically, Azure RTOS is a full development suite, not just an operating system. The suite includes an RTOS – called ThreadX; GUIX Studio, which provides a graphical user interface (GUI) development environment; and Azure NetX, which is a TCP/IP protocol implementation for Azure ThreadX, among other tools.

Why is Azure RTOS ThreadX Important in IoT?

ThreadX is lightweight and provides a great development environment with intuitive tools, as well as relatively high processing capabilities suitable for 32-bit devices. Those are the two top reasons Azure RTOS has been used in more than ten billion devices worldwide and is a developer favorite for 32-bit microcontroller IoT applications.

Azure RTOS ThreadX also supplies one of the most essential needs of IoT device development: a tiny footprint. With ThreadX, processes like booting, task switching, etc. require little power and take only fractions of a microsecond.

Plus, ThreadX has a feature that many other RTOS options don’t, called preemption-threshold scheduling. This feature is useful enough that we’ll take a minute to give some more detail.

Since an RTOS has to switch between tasks (context switching), the system might have to preempt or interrupt a less important task to perform a more important task. So tasks performed by the processor are given priority levels. That way the RTOS can know which tasks are okay to interrupt and which ones shouldn’t get interrupted. Preemption-threshold scheduling establishes a threshold, or limit, to the priorities that can and can’t be interrupted, thereby reducing context switching and interrupted tasks.

So, say you have four different levels of priority. You could set a threshold level so that the two lowest-priority tasks can’t interfere with each other, because even though one may technically be higher priority, it’s not high enough to necessitate interrupting the other task.

On the other hand, the two highest priority tasks above the threshold will interrupt the tasks below, but not each other. Since context switching can result in interrupted tasks and latency, reducing the number of task changes helps improve performance. So Azure ThreadX holds a special place in IoT applications that require both low-level power consumption and high performance.

As another important note, since Azure RTOS is from Microsoft, it’s easy to connect with Microsoft Azure’s cloud servers if you want communication between devices or data collected by IoT sensors to go through the cloud.

What Are Azure RTOS Threadx-supported Devices?

Azure RTOS works for most IoT devices, though it is optimized for devices relying on 32-bit MCUs. Some hardware has been specifically licensed for use with the Azure RTOS. As such, you can use any of these hardware options with ThreadX completely for free.

The MCU and MPUs that are specially licensed for Microsoft Azure RTOS include:

  • STMicroelectronics’ STM32 MCUs
  • STMicroelectronics’ STM32 MPUs
  • MediaTek’s MT3620 MCU (Azure Sphere)
  • Microchip’s PIC 32-bit MCUs
  • Microchip’s SAM 32-bit MCUs
  • Microchip’s SAM 32-bit MPUs
  • Renesas’ RX and RA MCU families
  • Renesas’ RZ MPU family
  • NXP’s i.MX RT10xx and RT116x/7x series crossover MCUs
  • NXP’s LPC5500 series

This list is subject to change, and a regularly updated version can be found on the Azure RTOS Github page.

Why Should You Implement the ThreadX Operating System?

We’ve talked a little bit about some of the benefits of ThreadX, but there are some other noteworthy facts that make this operating system stand out compared to other options.

  • Extensive documentation
  • Supported by Microsoft
  • Trusted by IoT developers
  • Extremely developer-friendly
  • Easy integration with the Azure cloud ecosystem

All told, Azure ThreadX is a solid choice as an IoT operating system.

How Much Does Azure RTOS Cost?

You can actually get the Azure RTOS source code for free on GitHub. As long as you plan to use the RTOS on Azure RTOS-licensed hardware, there’s no additional cost.

On the other hand, hardware that isn’t from Microsoft’s industry hardware partners requires a simple annual licensing program before you can sell the final product. For the specific pricing options, you’ll have to contact Microsoft directly.

Since many other RTOS options have pricing tiers that are readily available, the unclear pricing for Azure RTOS may be a downside for some people. Plus, if you want to connect your device to the Azure cloud service, your cost will go up even more.

Wrapping Up

While Azure RTOS is a great option for IoT, you may not always want to pay for an expensive cloud server in the Azure ecosystem. Plus, there are security concerns when all communication with an IoT device has to go through the cloud, since malicious actors can intercept the data.

By contrast, Nabto’s P2P connectivity platform allows the IoT device to communicate directly with, say, the client’s smartphone, without using the cloud as an intermediary. This ensures that communication is always secure, encrypted, and safe from outside access.

With low-cost, predictable pricing options, the Nabto Edge platform also provides transparency that’s currently lacking with Azure RTOS. If you’re interested in the benefits of Nabto Edge and P2P communication, consider contacting us for more information.

Read Our Other Resources

We’ve also published a range of other IoT device resources for our community. Click through here to:

Want to learn more about P2P IoT?

Please visit the:
P2P IoT Academy

Deep dive Into our documentation?

Please visit the:
Nabto Platform Overview

Try our demo for Video Surveillance?

Please visit the:
Nabto Edge
Video Cam Demo

Looking for other Great posts?