Scheduler and Task Management¶
The criterion. The scheduler must guarantee execution timelines: preemptive fixed-priority scheduling (the industry standard), plus round-robin or time-triggered options, with deterministic, predictable context-switch and interrupt latency.
How Revera answers it¶
Revera schedules preemptive fixed-priority by default, with round-robin among equal priorities and an
optional EDF (earliest-deadline-first) policy. Priority is an explicit number in [TK_PRIO_MIN, TK_PRIO_MAX] (0..255), not a vague level — higher preempts lower, equal round-robins. On the MCU ports a
timer interrupt can switch at any instant; on the desktop the same code runs cooperatively. Every port
provides its own O(1)-style ready selection; the exact context-switch cycle count is a per-target property
(measure it — Revera does not publish a number it cannot back on your silicon).
Feature · how to turn it on · how to use it · where it works¶
Feature |
Turn on with |
Use these APIs |
Where |
|---|---|---|---|
Preemptive fixed-priority |
default |
|
all |
Round-robin (equal priority) |
default |
|
all |
Cooperative mode |
|
|
all |
EDF (deadline-driven) |
|
|
all |
Sleep / yield (blocking, not busy-wait) |
— |
|
all |
Thread lifecycle |
— |
|
all |
Per-thread config |
setup |
|
all |
Full signatures and contracts: API reference — Threads / Kernel lifecycle.
Limits & roadmap¶
Context-switch / interrupt-latency cycle counts are not published — they are arch- and board-specific; measure on your target. A tickless / time-triggered mode is not in 0.1.0.
EDF is optional and off by default (fixed-priority is the safe, deterministic default).
Learn more¶
How it works: tick policy · timekeeping.
Run it:
examples/threads(priority + round-robin) ·examples/threads_smp.Full API: API reference.