ARM Architecture

From bare-metal to RTOS: 5 Causes to make use of an RTOS

Builders can provide you with superb and convoluted causes to not use an RTOS. I’ve heard excuses starting from they’re too costly (regardless of open supply options) all the best way to they aren’t environment friendly and use an excessive amount of reminiscence. In some circumstances some excuses are justified however there are lots of the reason why a developer ought to look to an RTOS to assist with their real-time scheduling wants.

From bare-metal to RTOS Fast Hyperlinks

Cause #1 – Can simplify complicated integration efforts

Many trendy embedded programs which might be going to be web linked have extra complicated scheduling wants than a standard stand-alone system. A number of instance parts embrace file programs, USB, TCP/IP and GUI parts simply to call just a few. Making an attempt to combine these parts right into a bare-metal system wouldn’t solely be time consuming however could be a nightmare to the common developer. In lots of circumstances these software program parts are designed to work alongside an RTOS which makes integrating them quite simple. Integration efforts that may have taken weeks or a month on the bare-metal stage can now be finished in lower than just a few days simply by using an RTOS into the answer.

Cause #2 – Pre-emptive scheduling

There are occasions when a software program software must cease what it’s doing and take note of one other process or exercise. For a bare-metal scheduler, the one approach that this could occur is that if an interrupt is used after which code returns to the place it was beforehand executing. An RTOS is designed to permit every process to be supplied with a precedence that helps make sure that the duty is executed in a deterministic method. A bare-metal scheduler may be designed to imitate pre-emption however in a real real-time system, the true deal is required and that may solely be present in an RTOS.

Cause #3 – Configurability

The go to excuse for a lot of bare-metal builders is that an RTOS makes use of an excessive amount of code area and reminiscence. The actual fact is that RTOSes right now are so configurable that they’ll slot in flash sizes smaller than two kilobytes simply by adjusting the RTOS settings. An RTOS may be very configurable for the applying at hand and might even be setup to behave as easy cooperative scheduler! RTOS configurability permits a developer to allow the options which might be wanted for the applying whereas disabling options that in any other case would take up an excessive amount of reminiscence.

Cause #4 – Portability and reuse

An RTOS comes with a pre-defined software program interface (API) that tends to remain mounted from one model to the following. The RTOS API supplies a constant interface that builders can use of their software code that may be reused and ported from one software to the following. Many in style RTOSes are developed in order that they are often simply moved from one microcontroller structure to the following. This group may be it simpler to develop software program as soon as the RTOS API’s are understood.

Cause #5 – Frequent toolset

RTOSes are available in many sizes and styles however there are some options which might be widespread between all flavors. For instance, each RTOS comes with a solution to create duties, destroy duties, synchronous duties, talk between duties and lock assets. Some RTOSes could even enable knowledge swimming pools to be created for varied software functions. The RTOS is handy as a result of these options are all offered and accessible instantly. In a bare-metal software, if these instruments are mandatory then the developer has to create them. Recreation wastes time, isn’t as quick as one thinks and comes with validation and upkeep points. When utilizing any RTOS, you may be sure that there’s a minimal widespread toolset accessible to jot down the applying.


There are lots of the reason why a developer ought to resolve to make use of an RTOS. In lots of circumstances a fundamental bare-metal scheduler will do. In linked and IoT purposes, the place complicated connectivity stacks should be included, beginning off with an RTOS would possibly simply be what the physician ordered. Subsequent time we are going to start analyzing the fundamental instruments included in each RTOS that builders want to grasp. Keep tuned!

Jacob Beningo is an embedded software program guide who presently works with purchasers in additional than a dozen international locations to dramatically rework their companies by enhancing product high quality, value and time to market. He has revealed greater than 200 articles on embedded software program improvement strategies, is a sought-after speaker and technical coach and holds three levels which embrace a Masters of Engineering from the College of Michigan. Be happy to contact him right here, at his web site, and sign-up for his month-to-month Embedded Bytes E-newsletter right here.

You may additionally like… (promoted content material)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button