Essential Guide to Embedded Operating Systems
Published Jun 29, 2021 | Updated Sep 9, 2021
By Risto Avila
Risto Avila, Technology Director @ The Qt Company. Risto is specialized in embedded software development and system integration.
Choosing the right embedded operating system (OS) is vital to building an embedded device. I have years of experience working with operating systems. I share my tips and those of my colleague Santtu Ahonen and other experts on choosing the right OS for your project.
In this article:
- Advantages and disadvantages to embedded operating systems
- How to choose an embedded OS
- Table comparing key features in top operating systems
What is an embedded operating system?
An embedded operating system is a specialized OS for an embedded device or system. The operating system aims to perform with certainty specific task(s) regularly that help the device operate.
How the OS fits into an embedded system
How an embedded operating system works
An embedded operating system often has limited features and functions. The OS may perform only a single action that allows the device to work, but it must execute that action consistently and on time every time.
Embedded operating systems are built into Internet of Things (IoT) devices. They are also part of many other devices and systems.
“Embedded operating systems are usually lean and mean," says Santtu Ahonen, Senior Product Manager, Portfolio Management, for Qt. "In most cases, embedded hardware doesn't have much capacity and has fewer resources. So, the amount of processing power and memory is very limited."
An embedded operating system has advantages and disadvantages.
Embedded operating system advantages:
- The OS is often low-cost.
- The OS tends to use few resources, including minimal power.
- The performance is generally trouble-free.
Embedded operating system disadvantages:
- The OS can usually only run a single or very few applications.
- It is difficult to modify the OS once you establish a framework and build it into the device.
- Trouble-shooting the OS when there are issues can be difficult.
Examples of embedded operating systems
There are dozens of embedded operating systems. Some are broad systems that work for a range of devices. Many embedded OSs are more popular for certain devices and industries. Your hardware design and selections will greatly impact on the OS selection.
Two ways to categorize embedded operating systems are: whether they run on microprocessors or microcontrollers; and whether engineers use them, especially for specific industries or devices. Embedded operating systems can also accommodate a variety of software development languages, including Embedded C.
Embedded operating systems: running on microprocessors vs. microcontrollers
Embedded OSs on microprocessors:
- Embedded Linux, especially Yocto and various vendor specific derivates of it
- Desktop Linux/Windows
- Ubuntu and Debian
- Windows for IoT
- Embedded Configurable Operating System (eCos)
Embedded OSs on microcontrollers:
- Embedded Configurable Operating System (eCos)
- "Bare metal" on microcontrollers: Some embedded systems using microcontrollers don't have an OS. Engineers write an application directly on the hardware, and there is no operating system. This approach occurs when a real-time deadline is not a requirement.
Embedded operating systems: most often used in certain industries or devices
- Consumer Electronics (Televisions, Set-top Cable Boxes, etc.): Embedded Linux and Android and WebOS
- Automotive: Embedded Linux, QNX, INTEGRITY and Android
- Agriculture, Construction: Embedded Linux for operator terminals and RTOS for electronic control units
- Industrial: Desktop Windows/Linux, embedded Linux and bare metal for machine control
- Medical Devices: Embedded Linux, QNX, VxWorks, FreeRTOS, and bare metal
- Aviation: VxWorks, Embedded Linux
Embedded vs. non-embedded operating systems
Engineers build an embedded operating system on a device. The OS performs a simple task that’s not controlled in any way by outside users. A non-embedded operating system, like on a desktop computer, runs various applications directed by users.
Operating systems for general use vs. embedded systems
Non-embedded operating systems are what you find in a computer. These OSs allow the computer system to run software and applications and perform a range of tasks. Embedded operating systems perform minimal tasks—some instantaneously—that enable the embedded device to work.
Embedded operating systems vs. network operating systems
Network operating systems allow a group of computers to share needed resources. That means computers on a network operating system can share files, databases, printers, and other resources. Unlike embedded operating systems, users of networking OS have control over various tasks, which is similar to general operating systems.
Differences between a standard operating system and a real-time OS
A standard OS does not automatically assign priority to tasks. The system orders the tasks to complete the most in a reasonable time. Real-time operating systems (RTOS) guarantees it will finish a task in a defined period.
Some embedded operating systems are real-time operating systems. They process data as soon as it is inputted into the system, which helps the embedded OS complete its focused task consistently.
"A normal operating system has a system tick timer that goes off every few milliseconds. It looks around at the various queued up processes and threads and picks one according to some priority, and finds one that is ready to run," explains Brent Horine, Ph.D., a Senior Embedded Software Developer with Hypergiant, an AI solutions company that provides an AI services integration platform for Cloud, 5G and Edge. "The normal OS tends to schedule tasks in a round-robin type of approach where everyone gets a turn at a specific priority level. But a real-time operating system is much more concerned with deadlines. Its scheduling system is front and center in the operating system."
There are three kinds of RTOS: hard, firm, and soft
- Hard RTOS
With a hard RTOS, delivering the desired result every time is an absolute system requirement. A missed deadline means an entire system failure. Engineers use Hard RTOS in medical devices and vital components in cars, among other uses.
Burkhard Stubert, an independent software developer and consultant specializing in embedded systems, adds that a backup camera in a car might use hard RTOS. "So, it guarantees that it responds and shows the rear-view image within 100 milliseconds. And that means it really does it in 100 milliseconds. Not in 95. Not in 105 milliseconds. But 100 milliseconds. Which makes it deterministic as well," he shares.
- Firm RTOS
A firm RTOS may infrequently miss a deadline, which hurts overall system quality. If and when it misses deadlines too frequently, the system does not operate correctly.
- Soft RTOS
The system operates correctly even when the RTOS misses deadlines. However, too many missed deadlines mean the performance of the system suffers.
Selecting the right operating system for your next embedded system
There are many factors to consider when picking an operating system for an embedded device. Will you need a standard or real-time operating system? Are there limits on the device's power and computer memory?
Important things to evaluate when picking an OS for an embedded system:
- Does the device execute safety-critical tasks? (Some OSs are built and certified specifically for safety-critical jobs.
- Does your device need a standard or real-time operating system?
- If RTOS, should it be hard, firm, or soft?
- What are the power constraints, and how much does the operating system need?
- Should you use open-source or a privately licensed solution? Ahonen reminds engineers to remember an open-source solution may require more work to fit your embedded device needs. "You might learn that you have to spend quite a lot of time hardening the operating system and bumping the quality up because nobody made the exact kind of configuration that you need, and nobody did the testing."
- How much do you want to spend? Ahonen suggests thinking about the balance between a "free" open-source solution that requires more work from your engineering staff and commercial systems where much of that work is complete. "There's a price to pay. But you pay from your own labor, or you pay from paying somebody else, right?"
- What are the skills and experience of your existing development team? Stubert says this can be an important consideration when comparing two operating systems that otherwise might work for your project. "You might not find (your team has) experience with QNX or another real-time operating system. But you will always find people who know their way around Linux, at least a bit." Learn more about top technical and other skills that embedded engineers need.
- What application programming interfaces will you need? APIs allow the system to communicate with applications.
- What is the security of the operating system?
- Does the OS need to support peripherals your device may need?
- Will the device have a graphical interface or display?
- What’s the history and strength of the operating system? Ahonen explains the companies behind some of the actual systems may have a much shorter life than others. "So that also impacts your decision-making: Do you trust that this vendor will still be there in 10 years? Or do you trust that you can find somebody who knows something about this (system)?" He asks.
- What are the memory limits and the needs of the device?
- What features does the OS provide, and which of these do you or don't need? How much can you impact the following features (listed below)?
- File system
- Threads and process management
- Garbage cleaning and other memory management
- API’s for graphics and CPU management
- Windowing system
- Application lifecycle management, application launcher, system UI elements
- Security aspects (splits into many other bits)
- Update ability (both OS + BSP (board support package)); OTA support, something ready-made or is this also DIY for you
- Availability of other middleware, e.g. an HTTP server or a SQL database
- Peripherals support APIs (camera, Bluetooth, Wi-Fi, etc.)
- How will hardware integration work with the OS?
Questions to ask about the availability of the hardware integration with the OS:
- Does it come with a ready-made BSP, or do you need to bake one yourself?
- How does it handle security, such as secure elements, mechanisms to lock the device, etc.?
- What is the quality of the delivery?
- Is it a collection of libraries loosely put together by a community, or did someone spend the effort on hardening it?
- How much do you need to pay for the OS in terms of your own labor versus as a runtime cost per device?
- Can you actually do it yourself?
Comparison of top embedded operating systemsQt has prepared an Embedded Product Planning and Requirements Guide to help engineers understand how to approach building an embedded device. Inside, you’ll find a detailed comparison of some of the top embedded operating systems.
|Embedded Linux||Android||Blackberry QNX Neutrino RTOS||Greenhills Integrity||Wind River VxWorks||LG webOS||Microsoft Windows for IoT|
|Ease of development||★★★★||★★★★★||★★★||★★||★★★||★★★★||★★★★|
|Deterministic behavior (real-time)||★★★||★||★★★★★||★★★★★||★★★★★||★★||★★|
(WinIoT Core is royalty free)
|Customization and hardening cost||€€€||€-€€€€||€€||€€||€€||€€€||€|
What is the most widely used embedded operating system?
The most widely used embedded operating system is embedded Linux. Yotco is the most popular of the embedded Linux systems. Other popular embedded operating systems include Android, FreeRTOS, QNX, and VxWorks.
The importance of picking the right OS
Picking the best embedded operating system is essential to the success of an embedded device. The operating system determines which software your system can use and plays a role in how easy or challenging it will be to build the rest of the system.
To learn more about the important steps in building an embedded device, read our post on building a successful embedded product.
How Qt can help you develop scalable, cross-platform software
With Qt's libraries and tools, you can build software for any embedded hardware or operating system more straightforward and efficient. In addition, you can test and fine-tune your high-performance 3D/2D user interfaces live on your target hardware and reuse assets across different projects. Because software built with Qt works across platforms and is scalable MPUs down to MCUs, and even bare metal.
The Embedded Product Planning and Requirements Guide
In this guide for IoT and embedded product planning, we examine the most important criteria to consider at the outset, compare a list of the most used technologies, and rate them in easy-to-compare categories.Download