RT vs NIL

RT and NIL kernels share a common API but a different set of features, NIL can be seen as a subset of RT even if it is very different internally. The two RTOSes have very different architectures driver by their requirements.

Feature RT NIL Notes
System Time yes yes 16 or 32 bits system time counter.
High Resolution Time yes no System time, timers and delays at very high resolutions.
Real Tick-less Mode yes yes There is no periodic system tick for optimal power management.
Critical Zones yes yes Critical zones abstraction.
IRQ Management yes yes ISRs abstraction.
Zero Latency Interrupts yes yes IRQs unaffected by the kernel and with no kernel-related added latency.
Virtual Timers yes no Unlimited software one-shot timers with no IRQ overhead.
Timeouts yes yes Wait primitives with time-out specification.
Time Measurement yes no Execution time measurement with clock-cycle precision.
Full Threads Paradigm yes no Threads create/join functionality.
Threads Registry yes yes Runtime tasks state structure for debuggers.
Preemption yes yes Fully preemptive scheduling.
Round Robin Scheduling yes no Round robin scheduling for threads at equal priority.
Messages yes no Inter-thread synchronous messages.
Mailboxes yes yes Message queues.
Counter Semaphores yes yes Semaphores with resources counter.
Binary Semaphores yes yes Semaphores with boolean state.
Mutexes yes no Mutexes implementing the Priority Inheritance algorithm.
Condition Variables yes no Condition Variables and Monitors.
Events yes yes Events, Event Flags, Event Sources.
Dynamic Services yes no Dynamic threading.
Memory Allocators yes yes Various memory allocators (core, pools, heaps).
Objects FIFOs yes yes FIFOs of generic objects.
Objects Factory yes yes Handling of dynamic reference-counted objects accessible by a readable name.
Runtime Statistics yes no Execution times of critical code paths with clock cycle resolution.
System State Checker yes yes Development time call protocols check.
Parameter Checks yes yes Development time function parameters checks.
Assertions yes yes Development time kernel consistency checks.
Trace Buffer yes no Storage for the latest N context switch events.
Stack Overflows Check yes yes Runtime stack overflow checks.
Stack Fill yes yes Stack pattern fill for usage measurement.
CMSIS RTOS yes no CMSIS RTOS emulation layer.
Port Layer

Both RTOSes are very portable, architecture-dependent and compiler-dependent details are encapsulated in a “port” module. RT and NIL share ports, the port modules supports both RTOSes with no changes.

More articles and guides are available on the technical wiki.

learn more

Need Tutorials?

Try the video tutorials and guides on Play Embedded.

learn more

Need Support?

The forums is the best place, registration required.

learn more