ChibiOS/RT Logo ChibiOS/RT

Architecture - Reference Manual - Guides

Project Goals

Another RTOS?

The first question to be answered is: there was really the need for YET ANOTHER RTOS?
There are several reasons:

Why is it different?

Well, there are some design choices that should be explained and contribute to make ChibiOS/RT a peculiar design. Nothing really new in itself but the whole is interesting:

Static design

Everything in the kernel is static, nowhere memory is allocated or freed, there are three allocator subsystems but those are options and not part of core OS. Safety is something you design in, not something you can add later.

No tables, arrays or other fixed structures

The kernel has no internal tables, there is nothing that must be configured at compile time or that can overflow at run time. No upper bounds, the internal structures are all dynamic even if all the objects are statically allocated.

No error conditions and no error checks

All the system APIs have no error conditions, all the previous points are finalized to this objective. Everything you can invoke in the kernel is designed to not fail unless you pass garbage as parameters, stray pointers as examples. The APIs are not slowed down by parameter checks, parameter checks (and consistency checks) do exist but only when the debug switch is activated.
All the static core APIs always succeed if correct parameters are passed. Exception to this are the optional allocators APIs that, of course, can report memory exhausted.

Very simple APIs

Each API should have the parameters you would expect for that function and do just one thing with no options.

Fast and compact

Note, first "fast" then "compact", the focus is on speed and execution efficiency and then on code size. This does not mean that the OS is large, the kernel size with all the subsystems activated weighs around 5.3KiB and can shrink down around to 1.2Kib in a minimal configuration (STM32, Cortex-M3). It would be possible to make something even smaller but:

  1. It would be pointless, it is already really small.
  2. I would not trade efficiency or features in order to save few bytes.

About the "fast" part, the kernel is able to start/exit over 220,000 threads per second on a 72MHz STM32. The Context Switch takes 1.2 microseconds on the same STM32.

Tests and metrics

I think it is nice to know how an OS is tested and how it performs before committing to use it. Test results on all the supported platforms and performance metrics are included in each ChibiOS/RT release. The test code is released as well, all the included demos are capable of executing the test suite and the OS benchmarks, see Testing Strategy.


Generated on Sun Nov 28 2010 14:09:55 for ChibiOS/RT by doxygen 1.7.1