Scheduler
roundRobinDiscipline.h
Go to the documentation of this file.
1 
10 #ifndef ROUNDROBINDISCIPLINE_H
11 #define ROUNDROBINDISCIPLINE_H
12 
13 #include "schedulingDiscipline.h"
14 #include <memory>
15 
16 namespace Scheduler
17 {
18 
19 class Process;
20 class Queue;
21 
23 {
24 public:
25  static constexpr const char *configKey = "roundRobinDiscipline";
26 public:
27  RoundRobinDiscipline(std::shared_ptr<SchedulerConfiguration> c) : SchedulingDiscipline(c){};
29  std::shared_ptr<Process> selectNextTask(Queue *readyQueue, std::shared_ptr<Process> running, unsigned int);
30  std::string getName();
31  bool preempts(TriggeringEvent trigger);
32 private:
33  std::shared_ptr<Process> currentProcess{nullptr};
34 };
35 
36 }
37 
38 #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
std::shared_ptr< Process > selectNextTask(Queue *readyQueue, std::shared_ptr< Process > running, unsigned int)
select the best task to run at this point.
RoundRobinDiscipline(std::shared_ptr< SchedulerConfiguration > c)
std::string getName()
returns the name of that discipline
static constexpr const char * configKey
bool preempts(TriggeringEvent trigger)
returns true if the argument is a scheduling trigger for this specific discipline ...