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

First Come First Served (FCFS) scheduling policy. More...

#include <fcfs_policy.h>

Inheritance diagram for contur::FcfsPolicy:
Collaboration diagram for contur::FcfsPolicy:

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 the next process in FCFS order.
bool shouldPreempt (const PCB &running, const PCB &candidate, const IClock &clock) const override
 FCFS never preempts the currently running process.
Public Member Functions inherited from contur::ISchedulingPolicy
virtual ~ISchedulingPolicy ()=default

Detailed Description

First Come First Served (FCFS) scheduling policy.

Selects the ready process with the earliest arrival/queue order. FCFS is non-preemptive.

Definition at line 14 of file fcfs_policy.h.

Member Function Documentation

◆ name()

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

Policy name.

Implements contur::ISchedulingPolicy.

◆ selectNext()

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

Selects the next process in FCFS order.

Implements contur::ISchedulingPolicy.

◆ shouldPreempt()

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

FCFS never preempts the currently running process.

Implements contur::ISchedulingPolicy.


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