Why You Need An RTOS

By Ralph Moore · November 14, 2026 · SecureSMX, SMX

Most criteria for not using an RTOS may have been valid 20 to 30 years ago, but are not valid now. Of course, there will always be tiny embedded devices that are best served with a super-loop or interrupt-driven code. However, though plentiful, these devices are not mainline and they consume only a tiny share of world-wide development resources. Most other embedded devices need an RTOS, especially those connected to the Internet, such as IoT devices.

Today RTOS decisions should be guided by the following:

  1. Huge gain in MCU performance and memory.
  2. Huge growth of security breaches.
  3. Increasing development cost.
  4.  Increasing maintenance cost.
  5. Feature Creep.
  6. Edge AI.

The venerable 8080, released by Intel in 1974 (5 decades ago), was an 8-bit processor with a clock speed of 2 MHz. It had no on-chip memory, no on-chip peripherals, and in fact, it required considerable external circuity to make it even work. It cost $350 in single quantity and $75 in 1000 quantity. External memory consisted of 4 KB EPROMs and 256 byte to 4 KB RAM chips. These were the days of true “bare metal” firmware, seldom exceeding 12 KB.

Today you can buy a 32-bit MCU that runs at 180 MHz, has on-chip 1 MB flash, 256 KB RAM, a dozen or more peripherals, requires minimal external circuitry, and costs $5 in 1000 quantity. Or you can go cheap with a 32-bit MCU that runs at 70 MHz, has on-chip 128 KB flash, 20 KB RAM, six or more on-chip peripherals, and costs $1 in 10,000 quantity. The latter is about two orders of magnitude better than the micro-processors of five decades ago. Decreasing semiconductor production costs insure that these prices will continue to go down.

Tasks

There are many kinds of tasks:

  1. Bare-metal tasks.
  2. Event-driven tasks.
  3. Active object tasks.
  4. Cooperative tasks.
  5. Normal tasks.
  6. One-Shot tasks.
  7. Etc.

A task is merely an RTOS object that executes code — it does not matter what kind of code. If, for example, you wish to implement mission-critical firmware as bare-metal code there is no problem with using an RTOS. You simply implement the code in a top-priority task that is resumed or started, whenever needed. Typically, a timer might be used to run this task periodically. Other tasks that run at lower priorities can be introduced without upsetting the basic design[1] – the mission-critical task can always preempt when necessary.

Alternatively, for event-driven code, a single task can incorporate a state machine or individual tasks can host active objects [Ref 1]. Like a bare metal implementation, these tasks have top priorities and less-important tasks have lower priorities. The lower-priority tasks might implement features such as event recording, security, OTA updates, etc.

Words of Caution

  1. Interrupt latency is the most important feature of an RTOS because it limits responsiveness of the device using it. Not all RTOSs implement it well, so be careful.
  2. Mission-critical firmware should operate below the hardware-enforced pmode barrier as illustrated in the diagram. As such, it is doubly-protected from malware that has breached a vulnerable umode partition.
  3. If you are not oversizing your processor and using an RTOS for your new embedded or IoT device, you are probably making a mistake. Both help to avoid surprises in the initial project and to provide flexibility to meet future requirements that grow the product’s market.

Development Cost

So you shaved another 50 cents off the MCU cost. Congratulations! If expected lifetime shipments are 10,000 units, you just saved your company $5,000.

For a typical embedded device project there are 2 to 5 firmware programmers, the average embedded system programmer costs his or her company $200K per year, and the average project lasts 6 to 12 months. So the employer’s product firmware expense is $200K to $1M, which averages $600K per year.

Maintenance Cost

Fixing bugs that got out of development has always been a problem that is often costly. Lifetime maintenance cost tends to be about the same as development cost. However this is likely to get much worse due to legislation such as the CRA, which requires lifetime security support for every IoT device. If you do not have built-in means for detecting breaches, minimizing damage from them, and patching your firmware, your product is going to be dead in the water, regardless of its nice features and low price. Achieving the CRA-mandated level of device resiliency is virtually impossible without the help of an RTOS designed for high security.

Security Fundamentals

Documented vulnerabilities are called Common Vulnerabilies and Exposures, CVEs. To date there are 402,000 CVEs and about 300 are being added each day! Fortunately only about 5% are being exploited “in the wild” (i.e. known to be actively exploited). However that amounts to 20,000 dangerous CVEs, many of which may be in your device.

Proactively patching all vulnerabilities in a device is not likely to be practical. A report by NetRise [Ref 2] found that for three routers, each contained an average of 1,120 CVEs, of which, 473 were ranked as having High or Critical vulnerability.

Fortunately, the CRA requires patching a vulnerability only if it is breached on your device. An RTOS designed for security can help you with this by isolating vulnerable firmware (e.g. SOUP, HAL, etc.) and by doubly protecting mission-critical firmware and sensitive data below the hardware-enforced pmode barrier. Consequently, you may be able to get away for years without patching your mission-critical code, which can result in a cure worse than the disease.

Isolating vulnerable firmware also allows triaging exploited vulnerabilities, based upon the importance of the partitions they are in. Mock partitions can be moved in place to keep a device running while a patch is being prepared. This gains valuable time for the security team, thus reducing overwork and burnout. When a patch is ready it can be installed in its partition without stopping the device, which can be very expensive if a vital device.

Feature Creep

Although engineers may think that feature creep is the product of marketeers who have too little useful to do, experience shows that it happens and thus it is good to be prepared for it. Adding new features to super-loop implementations can lead to spaghetti code. Adding new features to event-driven implementations can lead to excessively complex state machines. In contrast, adding new features to RTOS-based systems can be done without impacting existing structure nor functionality. It is accomplished by adding new tasks. Of course there must be sufficient processor capacity and memory, which is a good reason for oversizing your MCU choice.

Edge AI

Edge AI offers the possibility of more universal products that can be trained by users, such as factory personnel or homeowners. However, it requires significant additional processor power and memory capacity. Also, is not likely to work well without an RTOS to coordinate the necessary activities to support it.

An AI model should not be intermixed with mission-critical firmware. Instead, it should be treated as SOUP[2], because it may contain unexpected vulnerabilities. Worse, the tools that generated it may have been compromised and the AI model may already contain embedded malware! Thus, as shown in the diagram an AI model should be placed in an isolated partition in umode.

Then, if it hallucinates or otherwise causes trouble, it can be shut down and replaced with a mock partition to keep the system running while the support team figures out what went wrong and comes up with a replacement. The replacement can then be downloaded and installed without stopping the device. In addition, isolated partitioning permits easily uploading new AI models, as they are developed, to improve the customer experience.

Conclusion

he guidelines of yesteryear for RTOS selection are no longer applicable and may get you into trouble. New technology has changed things dramatically. You should overpower your processor selection and base your system on a modern, security-conscious RTOS like SecureSMX. Full source code and documentation for it are available at: www.github.com/Micro-Digital/SecureSMX.

References

  1. “An Event Friendly RTOS”, LinkedIn, Ralph Moore, August 2026.
  2. “Supply Chain Visibility & Risk Study”, NetRise, July 2024.

My LinkedIn Profile

Search

Categories

Recent posts

November 14, 2026
Why You Need An RTOS
October 15, 2026
Tokens Improve IoT Security
September 28, 2026
Task Runtime Limits
August 22, 2026
RTOS Pitfalls
August 16, 2026
Interrupt and Task RTOS Latencies