Blog

What You Need to Know before Getting Started with Azure RTOS

Publish
Jan 19 2024

Ready to explore our services?

Before You Get Started with Azure RTOS, Here's What You Should Know

With the ever-increasing era of internet-connected devices, each with different requirements, limitations, and use cases, require some embedded systems to work behind them. These systems needed to handle more functions, more communication interfaces, for connecting those smart devices (built using WiFi, Bluetooth LE, Zigbee, 6LoWPAN, ethernet and GUI technologies). Of course, there are multiprocessors or microcontrollers inside the embedded systems to provide necessary address space and power to keep up functions like data acquisition from sensors, appliance control and security systems. But, because of the processor load, are they enough to withstand enhanced device functionality on the software side?

Every simple IoT device ideally uses a 32-bit microprocessor to power up the application with defined functionality. As there is already a significant move from 8-bit and 16-bit to 32-bit microprocessors to support connectivity requirements, execution of communication protocols, it requires the use of real-time operating system (RTOS). Azure RTOS is one of the popular RTOSs which is used in a variety of resource constraint applications.

In this blog, we will discuss what is Azure RTOS and what things you need to consider before getting started with Azure RTOS.

Understanding Microsoft Azure RTOS

Microsoft’s suite of operating systems is growing at a continuous pace. Of late, the company brought Express Logic’s ThreadX RTOS into its Azure fold. With massive growth of sensors and IoT-based devices for business growth, Azure RTOS, one of the specialized OSs in the Azure IoT Sphere has started to gain huge traction from silicon vendors.

According to Business Insider Intelligence, there will be around 41 billion connected devices to come online in 2027. Also, IDC forecasted that 152,000 IoT devices are connected every minute by 2025.

That said, Azure RTOS is a strong addition to the Microsoft’s edge computing capabilities, which is now powering more than 6.2 billion devices worldwide.

What is Azure RTOS?

It’s an enterprise-grade, powerful operating system, specifically built for IoT and edge devices that fit between Arduino and Raspberry Pi microcontroller units. The main purpose of RTOS is to provide services and manage processor resources in a very timely manner for safety-critical applications. The resources comprise memory, peripherals, processor cycles, and interrupts.

The operating system supports popular IoT devices that use 32-bit microcontrollers and a whole development suite for embedded systems. And it is designed to manage resource constrained devices. The devices that are battery powered and use less than 64 KB of flash memory.

Taking a Deeper Dive into RTOS

An RTOS is critical for the hardware resource allocation and management in embedded systems. It hosts applications and processing data on a real-time basis. Azure RTOS allocates processing time among various tasks embedded software actually performs. This typically involves breaking down the software into individual pieces known as threads and creating a run-time environment that provides each individual thread its own share of virtual microprocessor.

Interesting Read: Important Benefits of Microsoft Azure Development

The real-time operating system controls thread execution and also the management of each thread’s context. Each thread is assigned a priority by the embedded developer. This is done to schedule & prioritize thread timings- which thread should run first if more than one is ready to run. In the situation of higher priority thread execution, the RTOS functions to save the current thread’s context to memory and restore the context of the new thread. Usually, the process of context switching happens within a fraction of second and it is completely invisible to the embedded software. It provides great consistency and reliability in processing timing, from acceptance of a task to its completion.

Important Things to Know Before Getting Started with RTOS

With IoT and the number of IoT based devices being developed exponentially to harness the benefits, it becomes important to consider using RTOS in the near future. The presence of a scheduler and the hardware management capability to produce a quick turnaround for running tasks, make RTOS a superior choice for IoT developers.

Here are some important pointers that one needs to consider while starting a new embedded project with RTOS.

Fine-Tune with Micro Controllers

With Azure RTOS, portability becomes easier. Threadx architecture can be easily ported to new silicon architectures. Microsoft’s new policy standards for Azure RTOS has received changes in how it’s being served to Microcontrollers. In the past, the porting was taken care of by third-party platforms, managed by Express Logic for their direct buyers. Now, it’s been delivered without any third-party involvement with hardware support from chip vendors like NXP, Microchip, to name a few. For example- NXP is using RTOS for their SDK devices, with everything coming straight from one vendor (hardware and software and development tools for example). With this approach, developers have the full freedom to write ThreadX code in NXP’s microcontroller development environment.

Development is Easy in Multithreading Environment

Prior to RTOS (non-multithreading environment), each embedded engineer is required to have a good understanding of the run-time behavior. This is needed because the allocation logic of the processor is all across the code. Small firmware projects are still manageable by a small team of developers. However, as the functionality increases, the development team must be expanded, and intimate knowledge is required. And communication between different code modules must then be implemented to allow inter-thread synchronization. In contrast, a multithreading environment, frees up developers from the troubles associated with processor allocation. In addition, RTOS platforms allow developers to focus on a specific area of an application. Now, development teams can work on specific areas of responsibility, without worrying about the other areas of the software. In RTOS, they have inter-thread communication services for efficient and consistent development.

For example, CSCS, Construction Skills Certification Scheme, a not-for-profit organization in the UK for the Construction Industry, introduced a new digital system that checks authenticity of the certificates. The platform was built on Azure microservices based architecture to add flexibility and scalability in the development process. The system supports two methods of communication, i.e., synchronous for direct communication, and asynchronous for no immediate response. Azure Microservice communicates with other microservice using synchronous HTTP for better syncing and efficient response handling.

Azure RTOS is Pre-certified

In companies, there are mission-critical systems that require industry wise accreditations from responsible government or authorities. This means system developers must provide ‘artifacts’ for all the software involved in the system. Many commercial purpose RTOSes are ‘pre-certified’ by such governing authorities that give immense benefits to developers. The best part about Azure RTOS is that it’s pre-certified for a number of safety standards including IEC 61508 SIL 4, IEC 62304 Class C, and ISO 26262 ASIL D certifications. In line to that, the platform provides an EAL4+ Common Criteria security certified environment. Using commercial RTOS like Azure RTOS, no artifacts need to be provided, which in turn, speed the process of certification of the system as well as reduce the cost and additional time.

The NetX library

To the ThreadX kernel, which is designed to scale hardware, the NetX library comes as an additional library feature. This TCP/IP stack library is best for today’s deeply embedded applications that need network connectivity. It ensures IoT devices to smoothly send data to services like Azure IoT. This library does work well for IPv4 connections; a newer yet alternative networking stack that supports IPv6. If a business is planning to deploy thousands of devices, it is a safe choice to use the second stack. Because IPv4 addresses are limited and are not pocket-friendly when it comes to scale.

GUI Option

Azure RTOS has GUI option for devices which makes it more useful when the device needs to interact with users. Similar to other RTOS platforms, Azure RTOS provides reliable, ultra-fast performance, with a library-based approach. Embedded developers can design the UI on a system using Azure RTOS GUIX Studio, which generates appropriate C code on the basis of input design. As Azure RTOS is pre-certified for industries like medical and automotive, a UI adds rich visualization to those applications.

Azure RTOS requires purchase

The cloud advantage ‘pay for what you use’ applies to RTOS as well. The starting range for commercial purpose RTOS is on the order of $10K for a royalty-free license. This includes full source code and full expert support. This is a one-time investment only as the license is valid for a lifetime. It is important to note that the free RTOS products are not actually free. In fact, they are simply free to use it. Without a revenue benefit, an open source RTOS platform does not yield significant advantages to R&D, product evolution, and support areas. Azure RTOS is available with its license and it might help businesses avoid other expenses that might come when a ‘free’ RTOS is used.

Wrapping Up

With the new Azure RTOS, Microsoft has evolved a portfolio of IoT based operating systems that make sense for small devices as well as edge controllers. It comes with several benefits, right from a small footprint, fast and deterministic execution to the pre-certified and easy to use implementation on the embedded system. With continued migration of IoT devices to 32-bit microprocessors in the coming time, there is a strong case to choose commercial RTOS.

Starting a new IoT project! Consult with our Azure experts today.