Products
Performance
Performance testing to compare different RTOS is not simple. Some systems implement features that are not tested at all, some system do more error checking, etc. has been tested based on the open source Thread-Metric benchmark test-suite produced by Express-Logic Inc.
Some competitors could not comply with some of the tests and one of the missing contenders is FreeRTOS because their license agreement does not allow performance tests. Download the software and draw your own conclusions why FreeRTOS does not publish their tests. Please refer to the Microchip Online Discussion Groups for their result and that can be found here.
The results of the tests are in the table and graph below and Q-Kernel wins with a distance on the average performance score. A more detailed description of the tests is available as a download.
| Cooperative Scheduling | Pre-emptive Scheduling | Interrupt Processing | Interrupt |
Message Processing | Synchronisation Processing | Memory Processing | |
| Q▪Kernel v3.5 | 17,141,251 | 11,559,613 | 17,141,260 | 6,282,177 | 10,908,076 | 27,904,359 | 19,998,144 |
| AVIX v4.0 | 18,730,514 | 11,460,380 | 17,125,013 | 6,023,870 | 8,151,857 | 27,878,435 | 12,618,419 |
| ThreadX | 11,847,800 | 4,870,885 | 6,918,050 | 3,052,151 | 6,928,383 | 15,337,354 | 12,863,624 |
| TNKernel | 4,138,692 | 7,784,052 | 3,180,224 | 5,722,266 | 13,623,702 | 9,745,907 | |
| uc/OS-II | 3,909,085 | 5,259,998 | 7,387,612 | 10,293,318 | 6,814,817 | ||
| AVA | 1,724,948 | 5,207,762 | 1,260,190 | 2,761,154 | 7,514,799 | 10,235,182 |
Remarks
The Q▪Kernel results are the best in the business, but it's good to mention that Q▪Kernel can even do better if the tests were built for a Dual-Mode RTOS instead for a traditional RTOS.
- Cooperative scheduling can be done with lightweight threads, threads or fibers. Lightweight threads and fibers were not used to comply with the Thread-Metric test, so the real performance of Q-Kernel is even greater. Lightweight Threads are 114% faster and fibers are 89% faster than traditional threads.
- Q▪Kernel has two ways to implement sending and receiving of messages. Pipes can be used to send information by value, and queues to send information by reference. Because the Thread-Metric tests send messages by value Q-Kernel has implemented the test with pipes.
- Because Q▪Kernel manages all its resources dynamically it requires a dynamic memory management system. While most competitors provide simple fixed size memory blocks Q▪Kernel offers real dynamic memory allocation without external fragmentation called Variable Memory Blocks. This memory is organized in pools and can be accessed by size or by pool. Accessing memory by pool is extremely fast and 100% deterministic. Q▪Kernel also provides two other memory allocation mechanisms, “Allocate Only Heap” and “Fixed Memory Blocks”. Fixed Memory Blocks can be allocated and de-allocated from interrupt handlers. The tests can be performed with fixed or variable memory blocks and the required code is included in the porting layer. The memory processing numbers are 19,998,144 for variable blocks and 18,180,129 for fixed memory blocks. Some systems provide blocking functionality for memory allocation. The Thread-Metric test suite does not require this functionality and some vendors, including ThreadX, implement the test without blocking by specifying a “NO_WAIT” parameter and will return an error if memory is not available. The Q▪Kernel implementation will first try to allocate a block from the pool and if no memory block is available it will try to allocate a block from the “allocate only heap” and will extend the pool. The system will throw and error if everything fails, just like ThreadX. This behavior follows the more dynamic nature of the Q▪Kernel memory management. The following graph shows allocating and de-allocating of memory blocks from a 224 block pool. The X-Axis shows the number of memory blocks already in use and the y-axis show the number of cycles required for allocation and freeing a memory block. AVIX allocates and de-allocates the first block from the pool in 58 cycles. Q▪Kernel allocates and de-allocates its first block from the fixed pool in 29 cycles while the variable pool only takes 23 cycles. The 180th block will take AVIX 80 cycles and Q▪Kernel 23 cycles (variable pool) or 50 cycles (fixed pool).
Purchase a License Key for the Basic License, Full License or Upgrade of our products.
Download the latest release of Q▪Kernel including documentation, demo License Key and other user information.
Get the answers to some common questions about Q▪Kernel
Contact us with any questions you might have and we’ll do our best to help resolve any issues.