Scheduler
Public Types | Public Member Functions | Protected Member Functions | List of all members
Scheduler::PriorityDiscipline Class Referenceabstract

#include <priorityDiscipline.h>

Inheritance diagram for Scheduler::PriorityDiscipline:
Scheduler::SchedulingDiscipline Scheduler::EdfDiscipline Scheduler::FixedPriorityDiscipline Scheduler::RmsDiscipline

Public Types

typedef bool(* ComparatorPointer) (std::shared_ptr< Process >, std::shared_ptr< Process >)
 

Public Member Functions

 PriorityDiscipline (std::shared_ptr< SchedulerConfiguration > c)
 
virtual ~PriorityDiscipline ()
 
std::shared_ptr< ProcessselectNextTask (Queue *readyQueue, std::shared_ptr< Process > running, unsigned int)
 select the best task to run at this point. More...
 
virtual bool preempts (TriggeringEvent trigger)
 returns true if the argument is a scheduling trigger for this specific discipline More...
 
virtual std::string getName ()=0
 returns the name of that discipline More...
 
- Public Member Functions inherited from Scheduler::SchedulingDiscipline
virtual ~SchedulingDiscipline ()
 
 SchedulingDiscipline (std::shared_ptr< SchedulerConfiguration > c)
 
virtual void end ()
 

Protected Member Functions

virtual void updatePriorities (Queue *readyQueue, std::shared_ptr< Process > running)
 sets the correct priorities to the tasks, especially if dynamic priorities are used. More...
 
virtual ComparatorPointer getComparator ()
 return a function pointer to a function that provides comparison of tasks' priorities More...
 

Additional Inherited Members

- Protected Attributes inherited from Scheduler::SchedulingDiscipline
std::shared_ptr< SchedulerConfigurationconf {nullptr}
 

Detailed Description

Definition at line 19 of file priorityDiscipline.h.

Member Typedef Documentation

typedef bool(* Scheduler::PriorityDiscipline::ComparatorPointer) (std::shared_ptr< Process >, std::shared_ptr< Process >)

Definition at line 25 of file priorityDiscipline.h.

Constructor & Destructor Documentation

Scheduler::PriorityDiscipline::PriorityDiscipline ( std::shared_ptr< SchedulerConfiguration c)
inline

Definition at line 22 of file priorityDiscipline.h.

virtual Scheduler::PriorityDiscipline::~PriorityDiscipline ( )
inlinevirtual

Definition at line 23 of file priorityDiscipline.h.

Member Function Documentation

PriorityDiscipline::ComparatorPointer PriorityDiscipline::getComparator ( )
protectedvirtual

return a function pointer to a function that provides comparison of tasks' priorities

Returns
a pointer to a function taking two processes as arguments, and returning a boolean value. The return value is true if the first argument task's priority is higher than the second one.

Reimplemented in Scheduler::RmsDiscipline, and Scheduler::EdfDiscipline.

Definition at line 62 of file priorityDiscipline.cpp.

virtual std::string Scheduler::PriorityDiscipline::getName ( )
pure virtual
bool PriorityDiscipline::preempts ( TriggeringEvent  trigger)
virtual

returns true if the argument is a scheduling trigger for this specific discipline

Parameters
triggerthe type of the event that triggered the scheduling invokation

Implements Scheduler::SchedulingDiscipline.

Definition at line 40 of file priorityDiscipline.cpp.

std::shared_ptr< Process > PriorityDiscipline::selectNextTask ( Queue readyQueue,
std::shared_ptr< Process running,
unsigned  deadlineMisses 
)
virtual

select the best task to run at this point.

Parameters
readyQueuethe ready queue
runningthe currently running task
deadlineMisses
Returns
the next task to be run

Implements Scheduler::SchedulingDiscipline.

Definition at line 21 of file priorityDiscipline.cpp.

void PriorityDiscipline::updatePriorities ( Queue readyQueue,
std::shared_ptr< Process running 
)
protectedvirtual

sets the correct priorities to the tasks, especially if dynamic priorities are used.

Reimplemented in Scheduler::FixedPriorityDiscipline.

Definition at line 46 of file priorityDiscipline.cpp.


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