contur2
Loading...
Searching...
No Matches
contur::PriorityPolicy Class Referencefinal

Dynamic-priority scheduling policy. More...

#include <priority_policy.h>

Inheritance diagram for contur::PriorityPolicy:
Collaboration diagram for contur::PriorityPolicy:

Public Member Functions

std::string_view name () const noexcept override
 Policy name.
ProcessId selectNext (const std::vector< std::reference_wrapper< const PCB > > &readyQueue, const IClock &clock) const override
 Selects process with highest effective priority.
bool shouldPreempt (const PCB &running, const PCB &candidate, const IClock &clock) const override
 Preempts when candidate priority outranks running process.
Public Member Functions inherited from contur::ISchedulingPolicy
virtual ~ISchedulingPolicy ()=default

Detailed Description

Dynamic-priority scheduling policy.

Selects process with best effective priority and supports preemption when a higher-priority candidate becomes ready.

Definition at line 14 of file priority_policy.h.

Member Function Documentation

◆ name()

std::string_view contur::PriorityPolicy::name ( ) const
nodiscardoverridevirtualnoexcept

Policy name.

Implements contur::ISchedulingPolicy.

◆ selectNext()

ProcessId contur::PriorityPolicy::selectNext ( const std::vector< std::reference_wrapper< const PCB > > & readyQueue,
const IClock & clock ) const
nodiscardoverridevirtual

Selects process with highest effective priority.

Implements contur::ISchedulingPolicy.

◆ shouldPreempt()

bool contur::PriorityPolicy::shouldPreempt ( const PCB & running,
const PCB & candidate,
const IClock & clock ) const
nodiscardoverridevirtual

Preempts when candidate priority outranks running process.

Implements contur::ISchedulingPolicy.


The documentation for this class was generated from the following file: