Hello! Welcome to Embedic!
This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Embedded Events > How to choose an embedded system operating system: operating system features

How to choose an embedded system operating system: operating system features

Date: 08-09-2022 ClickCount: 239

Embedded system developers currently have a wide range of operating systems. Of course, the most straightforward operating system is no operating system! However, many of today's systems are complex, connected systems that may require an operating system. When needed, developers often want to use a real-time operating system (RTOS) or Linux to help them manage the complexity. Unfortunately, the choice between bare metal, RTOS, or Linux is not always clear. Each option has its pros and cons.

This article will explore the system characteristics that should be considered when choosing an operating system. Then in the next article, we will cover the times when it makes the most sense to use each operating system.

 

Product Lifecycle Costs

Choosing an operating system for an embedded system starts with understanding the lifecycle costs and requirements of the product. There is a tradeoff between the bill of materials (BOM) cost and the software maintenance cost of the product. For example, embedded systems using Linux find it easier to leverage open source software and find developers who can write the system software. However, Linux-based systems have more complex hardware requirements than microcontroller-based systems and may have higher BOM costs. Microcontroller-based systems may cost less, but fewer developers can successfully design and maintain them.

Designers need to weigh hardware and software costs to determine if it makes sense for their product to use hardware that can run Linux or if a cheaper, CPU-intensive solution is more appropriate.

 

Physical Features to Consider

Regarding hardware features and requirements, it is also important to examine the physical characteristics of the hardware selection when choosing an embedded operating system. Physical factors that should be considered for a microprocessor or microcontroller include

Peripheral feature set

Central processor clock speed

Available flash memory

 

Available memory

The physical constraints imposed on the system by the hardware may immediately limit the options you can use. For example, the processor usually needs to contain a memory management unit (MMU) to run embedded Linux style. Unfortunately, microcontrollers do not have MMUs, so to run Linux, designers need to have at least one application processor in the Cortex-A range rather than a microcontroller in the Cortex-M family (although things change quickly, and someone may have a microcontroller with an MMU and a reasonable clock rate).

To run embedded Linux, the hardware must also have at least 8 GB of storage, 16 GB of RAM, and 8 - 16 MB of internal flash memory. A kernel such as Linux may require a processor of at least 500 MHz. These are well above the levels required to run an RTOS, which requires at least 4 kB of RAM, 64 kB of flash memory, and a 24 MHz CPU.

 

Real-Time Performance

I know from experience that exploring the real-time performance characteristics between bare metal, RTOS, and Linux-based systems is a hot potato. Engineers specializing in microcontroller-based real-time systems will often tell you that you can't get real-time performance from a Linux system. Linux engineers will tell you this isn't true; there are real-time patches that provide actual real-time behavior. From there, the arguments usually get heated.

Whichever side of the fence you are on, it is important to look at real-time requirements and use them when selecting an operating system. Evaluate the determinism of your system needs and evaluate the OS against those requirements. I've seen Linux real-time versions that work well; others that don't. There is no universally correct answer, only one that works for your application.

 

Software Library Integration

One of the significant differences between using bare metal, RTOS, or Linux is the level of availability and integration of software libraries available to developers. In the bare-metal world, you are on your own. You have to write the software from scratch or integrate third-party libraries. On the other hand, RTOS will come with a set of libraries already integrated with RTOS. For example, one might find circular buffers, memory management tools, file systems, etc. More libraries are available and integrated, but one may still need to do some work on their own.

When you look at Linux, it feels like developers have an almost unlimited supply of libraries that are available and already integrated with the system. The most attractive feature of embedded Linux is the availability and integration of the software libraries. Developers own the entire operating system. This is powerful but also potentially dangerous.

 

Don't forget security

Today, many designers are building connected systems that must have a security solution. The operating system plays an important role in the security solution. For example, if a vulnerability is found in the standard library used by the Linux kernel, it will be present in every Linux device until it is patched. Bare metal or RTOS-based systems will most likely not have the same vulnerability. Specific operating systems are more vulnerable to hacking than others because they can use a toolset to crack these devices. For example, I have put embedded systems using RTOS directly on the Internet unprotected, which have been uncompromised for weeks. I once put a Linux-based system on the Internet, which was hacked and became part of a Chinese botnet within 48 hours. In Linux system defense, I believe the default password is still set, but it shows that if you don't take the time to configure your OS properly, it doesn't take much to crack it.

 

Conclusion

There are many features that developers should consider when choosing an operating system. The first characteristic is more relevant to the cost and business aspects of the building product. However, more important attributes such as available libraries, security, maintainability, etc., also play a crucial role. So which operating system should you use and under what circumstances? In the next article, we will explore this question and provide guidelines on where to use bare metal, RTOS, and Linux.

  • Heterogeneous computing, the use of RISC-V true power
  • How to Choose an Embedded System Operating System: A Selection Guide

Hot Products

  • PIC32MM0256GPM064-I/MR

    Manufacturer: Microchip

    IC MCU 32BIT 256KB FLASH 64QFN

    Product Categories: 32bit MCU

    Lifecycle:

    RoHS:

  • TMS320C6746BZCEA3

    Manufacturer: Texas Instruments

    IC DSP FIX/FLOAT POINT 361NFBGA

    Product Categories: DSP

    Lifecycle:

    RoHS:

  • MSP430F1232IDWR

    Manufacturer: Texas Instruments

    IC MCU 16BIT 8KB FLASH 28SOIC

    Product Categories: 16bit MCU

    Lifecycle:

    RoHS:

  • PIC18LF25K22-I/SS

    Manufacturer: Microchip

    IC MCU 8BIT 32KB FLASH 28SSOP

    Product Categories: 8bit MCU

    Lifecycle:

    RoHS:

Customer Comments

  • Looking forward to your comment

  • Comment

    Verification Code * 

Compare products

Compare Empty