Scheduler
schedulingDiscipline.h
Go to the documentation of this file.
1 
10 #ifndef SCHEDULINGDISCIPLINE_H
11 #define SCHEDULINGDISCIPLINE_H
12 
13 #include <string>
14 #include <memory>
15 
18 
19 namespace Scheduler
20 {
21 
22 class Process;
23 class Queue;
24 
26 {
27 public:
28  virtual ~SchedulingDiscipline(){};
29  SchedulingDiscipline(std::shared_ptr<SchedulerConfiguration> c) : conf(c){};
36  virtual std::shared_ptr<Process> selectNextTask(Queue *readyQueue, std::shared_ptr<Process> running, unsigned int deadlineMisses)=0;
40  virtual bool preempts(TriggeringEvent trigger)=0;
43  virtual std::string getName()=0;
44 
45  virtual void end(){};
46 protected:
47  std::shared_ptr<SchedulerConfiguration> conf{nullptr};
48 };
49 
50 }
51 
52 #endif
TriggeringEvent
Definition: eventType.h:16
This class implements the ready queue and the wait queue. Those queues contain processes ready to run...
Definition: queue.h:28
virtual std::shared_ptr< Process > selectNextTask(Queue *readyQueue, std::shared_ptr< Process > running, unsigned int deadlineMisses)=0
select the best task to run at this point.
virtual std::string getName()=0
returns the name of that discipline
std::shared_ptr< SchedulerConfiguration > conf
virtual bool preempts(TriggeringEvent trigger)=0
returns true if the argument is a scheduling trigger for this specific discipline ...
SchedulingDiscipline(std::shared_ptr< SchedulerConfiguration > c)
def deadlineMisses(reportsFolder, configFilename, reportFilename, runningTime)
Definition: shortReport.py:36