May 18, 2021 VxWorks

Monolithic Kernel or Microkernel for RTOS

By Michel Chabroux


Once upon a time there was a great debate about whether microkernel software design was superior to a monolithic kernel like the one found in the Linux operating system. I’m talking, of course, about the famous Tanenbaum-Torvalds debate of the 1990s. There’s no need to rehash that debate here. Suffice it to say that many of today’s general-purpose operating systems, including Linux, use a monolithic kernel design (so that old debate is pretty much moot). Windows is in between the two.

When it comes to choosing real-time operating systems (RTOSes), you do have choices. Some commercial RTOS offerings are built on a microkernel design, while others take a monolithic kernel approach.

What’s the Difference?

In a microkernel design, as much functionality as possible is removed from the kernel and delegated to separate operations spaces that communicate by passing messages to each other via the bare-bones kernel.

In a monolithic design, on the other hand, kernel and operation processes both share the same space, and messages are passed directly between processes without mediation by the kernel.

The advantages of each approach, in theory, can be summed up rather succinctly:

• Microkernels can offer time and cost savings when it comes to updates because of their modular nature—not every module will need to be changed at once.

• Monolithic kernels, on the other hand, offer performance advantages because of their integrated nature, with no overhead needed for the kernel to mediate calls among the modules.

Notice I said that these are the advantages in theory. Why? Because for many embedded projects, these differences are not important enough to be a real factor in choosing an RTOS.

In some contexts, the modular nature of microkernels does have some advantages in terms of being able to modify one part without rebuilding everything. However, that advantage is limited in the real world by the integrated nature of many systems — and, in some instances, it is further limited by performance requirements. While a developer might not need to rebuild the whole system, the system will likely still need to be tested as a whole.

Likewise, the performance advantages of monolithic kernels are very real, but the benefits of that better performance might not always be so important. If two systems both perform within the defined requirements, then there may or may not be a benefit to choosing the faster one. Also, performance is hardware dependent, so a slower RTOS might achieve parity by running on superior hardware.

So It Doesn’t Matter? Actually, It Does

Don’t get me wrong; details matter. VxWorks is a monolithic kernel design that is highly optimized to achieve the best possible performance on each hardware platform, and Wind River stands by that approach. For one thing, RTOS environments and requirements are becoming increasingly complex, and the performance advantage of monolithic kernels increases with the complexity of the workload.

What I’m saying is this: Don’t choose an RTOS because it has a monolithic kernel or a microkernel architecture. Choose it because it is a powerful, modern RTOS equipped with capabilities for the intelligent edge — where containers interact with the cloud and machine learning is embedded.

You can read more about the modernization of the RTOS here: Let the Modernization of the RTOS Begin (at Last).

Previous Wind River Studio Honored as Bronze Stevie® Winner in 2021 American Business Awards®
Next 5G RAN Evolution: Moving Forward