25 [[nodiscard]] std::string_view
name() const noexcept override;
29 const std::vector<std::reference_wrapper<const
PCB>> &readyQueue, const
IClock &clock
Abstract clock interface for simulation time.
Strategy interface for scheduling algorithms.
ProcessId selectNext(const std::vector< std::reference_wrapper< const PCB > > &readyQueue, const IClock &clock) const override
Selects next process according to MLFQ level ordering.
MlfqPolicy(std::vector< std::size_t > levelTimeSlices={1, 2, 4})
Constructs MLFQ policy.
const std::vector< std::size_t > & levelTimeSlices() const noexcept
Configured level time slices.
bool shouldPreempt(const PCB &running, const PCB &candidate, const IClock &clock) const override
Returns true when running process should be preempted.
std::vector< std::size_t > levelTimeSlices_
std::string_view name() const noexcept override
Policy name.
Process Control Block — stores all metadata for a single process.
ISchedulingPolicy interface for pluggable scheduling algorithms.
std::uint32_t ProcessId
Unique identifier for a process.