41 [[nodiscard]]
virtual std::string_view
name() const noexcept = 0;
Abstract clock interface for simulation time.
Strategy interface for scheduling algorithms.
virtual bool shouldPreempt(const SchedulingProcessSnapshot &running, const SchedulingProcessSnapshot &candidate, const IClock &clock) const =0
Decides whether the current running process should be preempted.
virtual ~ISchedulingPolicy()=default
virtual ProcessId selectNext(const std::vector< SchedulingProcessSnapshot > &readyQueue, const IClock &clock) const =0
Selects the next process ID from the ready queue.
virtual std::string_view name() const noexcept=0
Human-readable policy name.
PriorityLevel
Discrete priority levels, from highest (Realtime) to lowest (Idle).
@ Normal
Default priority for user processes.
std::uint64_t Tick
Simulation clock tick counter.
std::uint32_t ProcessId
Unique identifier for a process.
constexpr ProcessId INVALID_PID
Sentinel value indicating an invalid/unassigned process ID.
constexpr std::int32_t NICE_DEFAULT
Default nice value (no adjustment).
Process priority levels and the Priority struct.
Immutable process view consumed by scheduling policies.
PriorityLevel effectivePriority
Common type aliases, sentinel constants, and forward declarations used throughout the Contur 2 kernel...