⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module scheduler

Module scheduler 

Source
Expand description

Core scheduler implementation

Contains the Scheduler struct which implements the scheduling algorithms (round-robin, priority, CFS, hybrid), task enqueueing/dequeueing, context switching, and the global scheduler instance.

Structs§

Scheduler
Scheduler state

Enums§

SchedAlgorithm
Scheduling algorithm

Functions§

current_scheduler
Get scheduler for current CPU
get_task_ptr
Look up a task pointer by PID. O(log n) via BTreeMap.
register_task
Register a task in the global PID-to-Task registry.
schedule_on_cpu
Schedule on specific CPU
should_preempt
Check if should preempt current task
unregister_task
Unregister a task from the global PID-to-Task registry.