SuperTinyKernel RTOS
Real-time operating system
From Wikipedia, the free encyclopedia
SuperTinyKernel™ RTOS (STK) is a lightweight, high-performance, deterministic real-time operating system for resource-constrained embedded systems.[2] It is implemented in C++ with a clean object-oriented design and released under the MIT License. Unlike many traditional RTOSes, STK concentrates solely on a preemptive, deterministic thread scheduler rather than providing peripheral abstraction, keeping the kernel footprint minimal while prioritising timing accuracy and predictability.
| SuperTinyKernel™ RTOS | |
|---|---|
| Developer | Neutron Code Limited |
| Written in | C++, C |
| OS family | Real-time operating systems |
| Working state | Current |
| Source model | Open source |
| Latest release | 1.05.2[1] / March 2026 |
| Repository | github |
| Marketing target | Embedded systems |
| Available in | English |
| Supported platforms | ARM Cortex-M (ARMv6-M through ARMv8.1-M); RISC-V (RV32I, RV32E) |
| Kernel type | Microkernel |
| License | MIT |
| Official website | stk |
STK imposes no dynamic memory allocation, has no dependency on the C++ Standard Template Library, and provides a fully-featured C interface, making it suitable for safety-critical development. The absence of heap allocation satisfies MISRA C++:2008 Rule 18-4-1.
Scheduling
STK operates in two fundamental modes. In soft real-time mode, tasks cooperate via Sleep() and Yield() calls, with the kernel applying preemptive scheduling to prevent any task from starving others. In hard real-time (HRT) mode, tasks are periodic with guaranteed execution windows and strict deadlines enforced by the kernel; any deadline violation triggers a deterministic failure callback.
Tasks may follow either a static model (created once at startup) or a dynamic model (created and exited at runtime).
STK supports all major scheduling strategies, including Round-Robin (RR), Smooth Weighted Round-Robin (SWRR), Fixed-Priority Round-Robin (FPRR), Rate-Monotonic (RM), Deadline-Monotonic (DM), and Earliest Deadline First (EDF). Custom strategies can be provided by implementing the dedicated C++ interface.
STK also provides two proprietary Mixed criticality scheduling strategies available under a commercial license. The two-level Mixed-Criticality Adaptive Scheduler (MCAS) partitions tasks into low- and high-criticality groups, distributes CPU time between them at a configurable ratio using a token-bucket mechanism, and automatically suspends low-criticality tasks when a high-criticality task overruns its execution budget — resuming normal operation after a configurable cooldown period. The four-level variant (MCAS4) generalises this model to four independent criticality levels with cascade escalation and recovery, and adds an elastic CPU share adaptation mechanism driven by a per-group exponentially weighted moving average (EWMA) execution-pressure estimator, allowing groups under sustained load to borrow CPU share from lower-criticality neighbours without altering worst-case response time guarantees.
Synchronization
STK provides a rich synchronization API comprising mutexes (including a reader-writer variant), counting semaphores, condition variables, event flags, critical sections, spinlocks, and a thread-safe FIFO pipe for inter-task data passing. Synchronization support is optional and can be omitted at compile time to reduce Flash and RAM usage.
Task privilege separation
On ARM Cortex-M cores implementing the Memory protection unit (MPU) — Cortex-M3 and newer — STK supports hardware-enforced privilege separation between tasks. Trusted driver tasks run in privileged thread mode with full peripheral access, while application or untrusted tasks run in unprivileged mode where any direct peripheral access triggers a hardware fault. This isolates potentially attacker-controlled code paths from safety-critical hardware state.
Multi-core support
STK supports multicore embedded microcontrollers through an Asymmetric Multi-Processing (AMP) model, with one independent kernel instance per physical core. This design eliminates cross-core synchronization overhead inside the kernel and allows each core to operate with its own scheduling policy and timing domain.
Hardware support
STK targets ARM Cortex-M processors spanning ARMv6-M through ARMv8.1-M (Cortex-M0 through M55) and RISC-V RV32I and RV32E cores. Both soft and hard floating-point are supported. The kernel has been validated on development boards including STM32F0DISCOVERY (Cortex-M0), NUCLEO-F103RB (Cortex-M3), STM32F4DISCOVERY (Cortex-M4F), NXP FRDM-K66F (Cortex-M4F), NXP MIMXRT1050 (Cortex-M7), and Raspberry Pi Pico 2 W (Cortex-M33 and RISC-V).
Development and testing
STK includes an x86 scheduling emulator for Windows, allowing the same application code to be built, debugged, and unit-tested on a desktop PC without physical hardware. The scheduler logic carries 100% unit test coverage, and all commits are verified against QEMU targets for each supported architecture. Scheduling activity can be visualised with SEGGER SystemView.
Performance
Benchmarks conducted on an STM32F407VG (Cortex-M4 at 168 MHz) in February 2026, comparing STK v1.04.2 against FreeRTOS V10.3.1, showed STK achieving up to 31% higher task throughput, 25–55% lower RAM usage (~7 KB versus ~9–11 KB), and approximately 17% lower scheduling jitter in high-task-count scenarios. The trade-off is a larger Flash footprint (~25 KB versus ~13 KB), a consequence of the C++ template architecture.[3]
License
SuperTinyKernel is released under the MIT License, permitting free use in commercial, closed-source, open-source, and academic projects. Neutron Code Limited offers professional services including safety-certification assistance (IEC 61508, IEC 62304, ISO 26262, DO-178C) and SLA-backed commercial support.