Contur 2
Educational OS kernel simulator
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:

Public Member Functions

std::string_view name () const noexcept override
 Policy name.
ProcessId selectNext (const std::vector< SchedulingProcessSnapshot > &readyQueue, const IClock &clock) const override
 Selects the next process in FCFS order.
bool shouldPreempt (const SchedulingProcessSnapshot &running, const SchedulingProcessSnapshot &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< SchedulingProcessSnapshot > & readyQueue,
const IClock & clock ) const
nodiscardoverridevirtual

Selects the next process in FCFS order.

Implements contur::ISchedulingPolicy.

References selectNext().

Referenced by selectNext().

◆ shouldPreempt()

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

FCFS never preempts the currently running process.

Implements contur::ISchedulingPolicy.

References shouldPreempt().

Referenced by shouldPreempt().


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