|
Scheduler
|
#include <schedulingSimulator.h>
Public Member Functions | |
| SchedulingSimulator () | |
| SchedulingSimulator (std::shared_ptr< SchedulerConfiguration > conf) | |
| This constructor must be used when using a custom configuration file name or extensions. More... | |
| ~SchedulingSimulator () | |
| void | initializeTaskSet () |
| Builds the task set using a variety of methods This function is an alternative to using createRealTimeTask(), createInteractiveProcess(), or TaskSetGenerator::generate() and should be called before starting the simulation. More... | |
| std::shared_ptr< Process > | createRealTimeTask (double startTime, double period, double wcet, double deadline=0.0, int priority=0, double bcet=0.0, double powerCoeff=1.0) |
| creates a new real-time task event and add it to the event scheduling queue More... | |
| void | createInteractiveProcess (double startTime) |
| creates a new interactive process event and adds it to the event scheduling queue More... | |
| void | endSimulation (double time) |
| set the end of the simulation More... | |
| void | seedRandomGenerator (time_t seed) |
| seeds the random generator More... | |
| void | setStatsTick (double start, double interval) |
| void | setUsageCalculationTimeout (double start, double interval) |
| Sets a UsageUpdate timeout. More... | |
| void | setFreqUpdate (double start, double interval) |
| Sets a timer at the end of which the frequency governor updates the frequency of processor. More... | |
| void | setSchedulerTimeout (double start, double interval) |
| sets the timeout at which the task scheduler is invoked More... | |
| void | setDummyEvent (double start, double interval) |
| void | turnOnProcessor (double start) |
| turns on the processor More... | |
| void | startScheduler () |
| call this function to launch the simulation More... | |
Definition at line 28 of file schedulingSimulator.h.
| SchedulingSimulator::SchedulingSimulator | ( | ) |
Definition at line 32 of file schedulingSimulator.cpp.
| SchedulingSimulator::SchedulingSimulator | ( | std::shared_ptr< SchedulerConfiguration > | conf | ) |
This constructor must be used when using a custom configuration file name or extensions.
Definition at line 38 of file schedulingSimulator.cpp.
| SchedulingSimulator::~SchedulingSimulator | ( | ) |
Definition at line 44 of file schedulingSimulator.cpp.
| void SchedulingSimulator::createInteractiveProcess | ( | double | startTime | ) |
creates a new interactive process event and adds it to the event scheduling queue
| startTime | the time at which the process is created |
Definition at line 148 of file schedulingSimulator.cpp.
| std::shared_ptr< Process > SchedulingSimulator::createRealTimeTask | ( | double | startTime, |
| double | period, | ||
| double | wcet, | ||
| double | deadline = 0.0, |
||
| int | priority = 0, |
||
| double | bcet = 0.0, |
||
| double | powerCoeff = 1.0 |
||
| ) |
creates a new real-time task event and add it to the event scheduling queue
| startTime | the time at which the first job spawns |
| period | the interval at which jobs are spawned |
| wcet | the amount of work a job has to do before the deadline. This is not a time, because the time to process it depends on the processor frequency. |
| deadline | the interval from the time where a job is spawned to the time it has to be completed. If this value is 0.0, the deadline is the period. |
| priority | |
| isRandom | determines if the amount of work is random. In that case wcet is the worst-case amount of work |
| bcet | best case amount of work |
Definition at line 132 of file schedulingSimulator.cpp.
| void SchedulingSimulator::endSimulation | ( | double | time | ) |
set the end of the simulation
| time | the time at which to end simulation |
Definition at line 160 of file schedulingSimulator.cpp.
| void SchedulingSimulator::initializeTaskSet | ( | ) |
Builds the task set using a variety of methods This function is an alternative to using createRealTimeTask(), createInteractiveProcess(), or TaskSetGenerator::generate() and should be called before starting the simulation.
Definition at line 49 of file schedulingSimulator.cpp.
| void SchedulingSimulator::seedRandomGenerator | ( | time_t | seed | ) |
seeds the random generator
| seed | The seed has a time_t type, so it can be seeded with the current time in order to have better randomness. But a constant number can also be used for repeatability |
Definition at line 153 of file schedulingSimulator.cpp.
| void SchedulingSimulator::setDummyEvent | ( | double | start, |
| double | interval | ||
| ) |
Definition at line 196 of file schedulingSimulator.cpp.
| void SchedulingSimulator::setFreqUpdate | ( | double | start, |
| double | interval | ||
| ) |
Sets a timer at the end of which the frequency governor updates the frequency of processor.
| start | the time at which the first timer gets off |
| interval | the interval of time between two timeouts |
Definition at line 181 of file schedulingSimulator.cpp.
| void SchedulingSimulator::setSchedulerTimeout | ( | double | start, |
| double | interval | ||
| ) |
sets the timeout at which the task scheduler is invoked
| start | the time at which the scheduler is invoked for the first time |
| interval | the interval at which the timer is invoked |
Definition at line 188 of file schedulingSimulator.cpp.
| void SchedulingSimulator::setStatsTick | ( | double | start, |
| double | interval | ||
| ) |
| start | the time at which the first timeout occurs |
| interval | the interval at which the next timeouts appear |
Definition at line 174 of file schedulingSimulator.cpp.
| void SchedulingSimulator::setUsageCalculationTimeout | ( | double | start, |
| double | interval | ||
| ) |
Sets a UsageUpdate timeout.
| start | the time at which the first timeout occurs |
| interval | the interval at which the next timeouts will occur |
Definition at line 167 of file schedulingSimulator.cpp.
| void SchedulingSimulator::startScheduler | ( | ) |
call this function to launch the simulation
Definition at line 204 of file schedulingSimulator.cpp.
| void SchedulingSimulator::turnOnProcessor | ( | double | start | ) |
turns on the processor
| start | the time at which to start the processor |
Definition at line 235 of file schedulingSimulator.cpp.
1.8.11