Scheduler
maxGovernor.cpp
Go to the documentation of this file.
1 
10 #include "maxGovernor.h"
11 
12 #include <scheduler/queue.h>
13 #include <scheduler/processor.h>
14 #include <scheduler/system.h>
15 
16 using namespace Scheduler;
17 
18 MaxGovernor::MaxGovernor() : maxFreq(System::getInstance()->getProc()->getMaxFreq())
19 {
20 }
21 
22 void MaxGovernor::updateFreq(Processor *proc, Queue * /*readyQueue*/)
23 {
24  proc->setFreq(maxFreq);
25 }
26 
28 {
29  return true;
30 }
31 
32 std::string MaxGovernor::getName()
33 {
34  return "MaxGovernor";
35 }
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
bool freqChangeEvent(TriggeringEvent trigger)
Definition: maxGovernor.cpp:27
std::string getName()
Definition: maxGovernor.cpp:32
void setFreq(double)
set the current frequency of the processor
Definition: processor.cpp:121
void updateFreq(Processor *proc, Queue *readyQueue)
Definition: maxGovernor.cpp:22