RTOS PIC24 Thread-Metric Benchmarks

According to Express Logic, Inc., their ThreadX/MCU RTOS performed up to 50% better than other RTOSes measured by the Thread-Metric benchmark suite. In the tests, ThreadX/MCU RTOS ran on Microchip Technology’s [NASDAQ: MCHP] PIC24 16-bit microcontroller. The Thread-Metric benchmark suite is a freely-available set of benchmarks that measures many aspects of RTOS performance. Express Logic’s ThreadX/MCU RTOS is a small (2KB – 10KB), fast, royalty-free, affordable RTOS based on the highly popular ThreadX® RTOS, and is optimized for 16-bit microcontrollers such as Microchip’s PIC24 16-bit family and dsPIC® Digital Signal Controllers (DSCs). All tests were run on a Microchip 40 MIPS PIC24HJ256GP610 PIC24 16-bit microcontroller.

Comparison 1
The first comparison shows RTOS performance for ThreadX/MCU, uc/OS-II, TNKernel, AVA and FreeRTOS, with status checking included for each RTOS. In each test, Express Logic’s ThreadX/MCU outperformed all of the other RTOSes. In all tests, a higher score is better.

  ThreadX/MCU uc/OS-II TNKernet AVA FreeRTOS
Cooperative scheduling 11,847,800 (1) (1) (1) (1)
Preemptive scheduling 4,870,885 3,909,085 3,359,814 1,724,948 3,717,913
Interrupt processing 6,918,050 5,259,998 5,497,238 5,207,762 1,881,892
Interrupt preemption processing 3,052,151 (1) 2,693,630 1,260,190 2,400,967
Message processing 6,928,383 (3) 4,146,914 2,761,154 484,691
Synchronization processing 15,337,354 10,293,318 7,353,579 7,514,799 1,989,999
Memory processing 12,863,624 6,814,817 5,933,761 10,235,182 (2)

(1) Cooperative scheduling not supported
(2) Not reported
(3) mc/OS-II Message Processing test is not valid – copies 1 32-bit word instead of copying 4 32-bit words.

Comparison 2
The second comparison shows the results for ThreadX/MCU and the AVIX RTOS, which is the one RTOS for which status checking was not performed. For this comparison, ThreadX/MCU was also run without status checking to enable a consistent comparison. ThreadX/MCU outperformed AVIX substantially in cooperative scheduling (33.42%), message processing (56.28%) and memory processing (34.67%) while providing modest advantages in preemptive scheduling (5.39%), interrupt processing (4.13%), and interrupt preemption processing (2.67%). Only in synchronization processing did AVIX outperform Thread/MCU by 6.46%, and it is noted that AVIX uses 16-bit semaphores while ThreadX/MCU uses 32-bit semaphores. Again, in all tests, a higher score is better.

  ThreadX/MCU AVIX (3) ThreadX/MCU
Better By
Cooperative scheduling 11,848,815 8,880,289 33.42 %
Preemptive scheduling 5,032,710 4,775,165 5.39 %
Interrupt processing 7,342,967 7,051,598 (2) 4.13 %
Interrupt preemption processing 3,132,150 3,050,405 (2) 2.67 %
Message processing 7,354,317 4,705,841 56.28 %
Synchronization processing 17,592,956 18,729,971 (1) -6.46 %
Memory processing 14,413,455 10,702,506 34.67 %

(1) AVIX semaphores are 16-bits, ThreadX semaphores are 32-bits.
(2) AVIX uses the interrupted thread’s stack in ISR processing; ThreadX/MCU switches to a dedicated system stack.
(3) The AVIX thread-metric porting layer does not check return status. For this comparison, the porting layer for ThreadX/MCU was modified not to check status to enable a fair comparison with AVIX.

ThreadX/MCU license is available for prices starting at $5,990 with no royalties. Free evaluation copies are available for download as well.

More info: Express Logic | Thread-Metric