Here are details on FreeRTOS thread metric benchmark results. Currently FreeRTOS is present in the benchmark in single configuration with all protections turned off.
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 |
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.
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:
taskYIELD() - voluntary context switchWhat It Measures: Cost of voluntary context switches when threads explicitly yield CPU to peers of equal priority.
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:
vTaskSuspend() - suspend taskvTaskResume() - resume taskWhat It Measures: Cost of involuntary (preemptive) context switches driven by priority differences and thread suspending / resuming.
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:
xQueueCreate() - message queue definitionxQueueSend() - send message to queuexQueueReceive() - receive message from queueWhat It Measures: Combined cost of enqueueing and dequeueing messages (16-byte messages, queue depth 16).
Purpose: Measures mutex operation overhead.
Method: A single thread repeatedly acquires and releases a mutex, measuring lock/unlock cycle cost.
Kernel Primitives Used:
xSemaphoreCreateMutes() - mutex definitionxSemaphoreTake() - acquire mutexxSemaphoreGive() - release mutexWhat It Measures: Cost of uncontended mutex acquisition and release (no actual contention since single thread).