FreeRTOS

Here are details on FreeRTOS thread metric benchmark results. Currently FreeRTOS is present in the benchmark in single configuration with all protections turned off.

Test IPC cost

Above chart shows comparison of FreeRTOS to other RTOSes in terms of “instructions per cycle”. These data is derived from FreeRTOS test score and summarized in table below. This metric estimates instruction count needed to perform one test cycle involving all the typical overhead of the running system. In fact, this metric shows CPU cycles consumed to perform one test cycle rather than instructions. Yet the term “IPC” is used for this purpose and understood in the industry, so we will stick to this use as well.

Test Name FreeRTOS 10.3.1
Calibration 9.03
Message Passing 511.73
Synchronization 334.09
Cooperative Scheduling 140.81
Preemptive Scheduling 550.73

Test Summaries

1. Basic Processing

Purpose: Measures raw processing throughput without kernel overhead.

Method: A single thread continuously increments a counter in a tight loop.

What It Measures: Maximum achievable loop iterations, establishing a baseline for comparing kernel overhead in other tests.


2. Cooperative Scheduling

Purpose: Measures voluntary context switch efficiency.

Method: Five threads at equal priority take turns executing. Each thread increments its counter and yields control.

Kernel Primitives Used:

What It Measures: Cost of voluntary context switches when threads explicitly yield CPU to peers of equal priority.


3. Preemptive Scheduling

Purpose: Measures priority-based preemptive context switch efficiency.

Method: Five threads with different priorities (6-10) form a chain. Thread 0 (lowest priority) resumes thread with priority 1. This chain continues up until thread 4 which only suspends itself. Each of threads 1 - 4 (except of thread with lowest priority) suspends itself once thread with higher priority is resumed.

Kernel Primitives Used:

What It Measures: Cost of involuntary (preemptive) context switches driven by priority differences and thread suspending / resuming.


4. Message Processing

Purpose: Measures message queue operation overhead.

Method: A single thread sends a message to a queue and immediately receives it back, measuring round-trip message passing cost.

Kernel Primitives Used:

What It Measures: Combined cost of enqueueing and dequeueing messages (16-byte messages, queue depth 16).


5. Synchronization

Purpose: Measures mutex operation overhead.

Method: A single thread repeatedly acquires and releases a mutex, measuring lock/unlock cycle cost.

Kernel Primitives Used:

What It Measures: Cost of uncontended mutex acquisition and release (no actual contention since single thread).


← Zephyr