Applications › Education & research

RTOS for education and research

A real-time kernel you can read in an afternoon, run on your PC and extend with your own scheduling algorithm: for courses, theses and experiments.

Discuss your project See all features

The challenge

Black-box kernels

Large RTOSes bury scheduling logic under ports, drivers and configuration layers.

Hardware barriers

Students and labs need boards, debuggers and toolchains before the first task even runs.

Fair comparisons

Researchers need to implement and compare schedulers on the same kernel and the same task sets.

How STK helps

Readable C++

Clean C++ with no STL, exceptions or RTTI and minimal namespace use.

Runs on your PC

An x86 development mode lets you build and run examples without hardware.

Classic schedulers built in

Round-Robin, SWRR, fixed-priority with priority inheritance, preemption-threshold, RM, DM and EDF, with worst-case response time analysis for RM and DM.

Add your own scheduler

Implement the C++ strategy interface to attach a new scheduling algorithm.

Hard real-time you can observe

KERNEL_HRT mode with deadline monitoring and miss callbacks, plus SEGGER SystemView traces.

Real hardware when ready

The same code targets Arm Cortex-M and RISC-V, with STM32 and Raspberry Pi Pico examples in the repository.

A typical setup

  1. Clone the repository and run the x86 example to watch tasks being scheduled on a PC.

  2. Create tasks with different periods and deadlines, switch between RM, DM and EDF, and compare the outcomes using deadline-miss callbacks.

  3. Check schedulability with the worst-case response time analysis, then confirm it by measurement.

  4. For research, implement a new strategy through the strategy interface and compare it with the built-in ones on identical task sets.

  5. Move to a real board and use SystemView to compare theory with measurement.

Using STK in teaching or research? Let us know. The kernel is MIT-licensed, so no commercial license is needed for the open-source schedulers.

Teaching or researching with STK?

Questions about using STK in a course or research project? Get in touch.

Contact us

Other applications: Robotics & motor controlIndustrial automationMixed-criticality systemsSecure IoTBattery-powered & consumer devicesAudio & USBMigration from legacy RTOSAll applications