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