scx_model operates on 3 layers of abstraction:
trait Schedulerdefines the methods any BPF scheduler must implement. Each method is given a reference toKernelCtx, which exposes a subset of kernel resources and APIs, such as DSQ creation and idle CPU identification.SchedCoreholds a concreteSchedulerimplementation and its correspondingKernelCtx.SchedCorereceives ticks, performing scheduling action as needed by consulting itsSchedulerand mutating CPU state accordingly. EachSchedCore::tickreturns a list of completed tasks.Sim(src/sim/driver.rs) drives forward progress inSchedCoreand injects a list of high-levelJobs with astart_timeandrun_timeintoSchedCoreas new task wakeups when appropriate.Simis informed ofJobcompletions bySchedCore.