Scheduler & priorities
- Default:
16priority slots. - Configurable range:
2..256slots. - Priority
0is reserved for idle and is not an application priority. - At 256 slots, application priorities are
1..255; larger numeric values have higher priority. - Ready selection uses a bitmap and per-priority ready queues; selection scans the configured priority range.
- Supporting 256 slots does not allocate a fixed 256-task table.
Timing
- Default kernel tick:
100 µs. - Configurable range:
100..1000 µs, subject to the source validation rules. - Periodic tasks use
period_ticksandnext_run_timeas a scheduler release gate. - Short microsecond delays are busy-wait operations; blocking delays yield the CPU.
Static resources
- Default stack request:
128 bytes; task creation enforces an effective minimum allocation of256 bytes. - Custom task stack sizes are available through
os_task_create_st(). - The kernel task model uses statically sized task resources rather than a general-purpose task heap.
- Peak stack usage should be measured on the final target build.
IPC
- Events with ISR-safe signaling where provided.
- Mutexes with IPC ceiling behavior.
- Compile-time bounded FIFO queues.
- Counting semaphores.
- ISR-safe variants should be used from interrupt context where provided.
Monitoring
- Stack usage and watermark reporting.
- CPU usage reporting.
- Optional deadline monitoring.
- Optional TCB integrity checking.
- Fixed-size RAM error logging when enabled.
Configurable safety
- Software and hardware watchdog integration.
- MPU protection on suitable Cortex-M targets.
- RAM integrity testing.
- CRC-based integrity checking.
- Critical-section diagnostics.
- Safety target profiles perform compile-time configuration checks; they are not certification evidence.
Configuration defaults and limits
| Option | Default | Allowed values / limit |
|---|---|---|
OS_KERNEL_TICK_PERIOD_US | 100 µs | 100..1000 µs; must divide 1000 evenly |
OS_KERNEL_DEFAULT_STACK_SIZE | 128 B request | request ≥64 B; effective allocation floor 256 B; no explicit source max |
OS_KERNEL_MAX_PRIORITIES | 16 slots | 2..256 slots; priority 0 idle; application 1..N-1, up to 1..255 |
OS_KERNEL_TICKLESS_IDLE_EN | 1 | 0 or 1 |
OS_IPC_TOOLS_EN | 1 | 0 or 1 |
OS_MONITORING_EN | 0 | 0 or 1 |
OS_MONITORING_DEADLINE_ACTION | 1 | 0..2 |
OS_MONITORING_ERROR_LOG_SIZE | 16 | ≥1 entry |
OS_SAFETY_*_EN | 0 | 0 or 1; MPU/CRC/IWDG require matching hardware |
OS_SAFETY_TASK_MAX_RECOVERY | 3 | ≥0 |
OS_SAFETY_SOFT_WDG_TIMEOUT_MS | 3000 ms | ≥0 ms; application/process safety time constrains useful value |
OS_SAFETY_MAX_CRITICAL_US | 1000 µs | ≥0 µs; 0 disables check |
OS_TARGET_MEDICAL_CLASS | 0 | 0..3 |
OS_TARGET_INDUSTRIAL_SIL | 0 | 0..4 |
These are source-defined defaults and limits; derived hardware capability macros are not user-configurable.
Priority scaling
| Slots | Application priorities | Queue-head storage | Bitmap storage |
|---|---|---|---|
| 16 | 1..15 | 64 B requested queue-heads* | 4 B bitmap |
| 32 | 1..31 | 128 B | 4 B |
| 64 | 1..63 | 256 B | 8 B |
| 128 | 1..127 | 512 B | 16 B |
| 256 | 1..255 | 1024 B | 32 B |
These figures describe derived priority-extension storage; the base implementation also keeps a 32-entry queue-head array. They are scheduler storage figures only, not total application RAM.