STK operates in two fundamental modes. In soft real-time mode, tasks cooperate by voluntarily yielding execution time, 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, in which all tasks are created once at startup, or a dynamic model, in which tasks may be created and exit at runtime.
Tick and tickless modes STK supports two timer models for context switching. In the default tick-based mode a hardware timer fires at a fixed frequency and the scheduler is evaluated on every interrupt, providing simple and predictable behaviour suited to systems where timing granularity is fixed and power consumption is not a primary concern. In
tickless mode, kernel suppresses the periodic interrupt and instead programs the hardware timer dynamically so that the next interrupt fires precisely at the nearest upcoming event, such as a task wakeup or deadline. This keeps the CPU in its sleep state for as long as possible, substantially reducing power draw in battery-powered or infrequently active systems while preserving full timing correctness.
Scheduling strategies STK supports all major scheduling strategies, including
round-robin scheduling (RR), smooth
weighted round robin (SWRR), fixed-priority round-robin (FPRR),
rate-monotonic scheduling (RM),
deadline-monotonic scheduling (DM), and
earliest deadline first scheduling (EDF). The EDF implementation selects the runnable task with the smallest remaining deadline and is provably optimal for single-processor systems. Both RM and DM implementations include worst-case response time (WCRT) schedulability analysis. Custom scheduling strategies can be provided by implementing a 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
exponential moving average (EMA), also termed an 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==