|
Scheduler
|
#include <process.h>
Public Member Functions | |
| Process (int pid, int nbBursts, std::vector< double > cpuBursts, std::vector< double > ioBursts, int priority=0) | |
| Process (const Process &task) | |
| ~Process () | |
| void | setDurationDistribution (std::shared_ptr< Utils::BoundedRandomDistribution > randomDist) |
| int | getPid (void) const |
| int | getPriority () const |
| void | setPriority (int pri) |
| void | updateCurrentAow (double aow) |
| bool | advanceBurst () |
| void | decrementBurst () |
| double | getCurrentCpuAow () const |
| double | getCurrentIoTime () const |
| void | setRtParams (double dl, double T, double wcet, double bcet) |
| void | setDeadlineTimeFromStartTime (double startTime) |
| bool | isRealTime () const |
| double | getPeriod () const |
| double | getDeadline () const |
| double | getDeadlineTime () const |
| void | print (std::ostream &stream) const |
| void | incrementJobNumber () |
| unsigned int | getJobNumber () const |
| double | getWcet () const |
| void | setPowerCoeff (double) |
Static Public Member Functions | |
| static std::shared_ptr< Process > | createNextJob (const Process &task) |
| create the next job for a task More... | |
| static std::shared_ptr< Process > | createProcess (double cpuLambda, double ioLambda) |
| creates an "interactive" process More... | |
| static std::shared_ptr< Process > | createRealTimeTask (double wcet, double T, double dl, int pid, int priority=0, double bcet=0.0) |
| creates a real time task More... | |
| static int | getNewPid () |
| returns new process identifier. The value returned gets incremented at each call More... | |
| static unsigned long int | getMaxNumber () |
| returns the maximum number of process that can ever be created More... | |
| static void | setRandomGenerator (Utils::RandomGenerator *gen) |
| specify what random generator to use for interactive task length More... | |
| static void | end () |
| call this function before any other More... | |
Public Attributes | |
| double | powerCoeff {1.0} |
| Process::Process | ( | int | pid, |
| int | nbBursts, | ||
| std::vector< double > | cpuBursts, | ||
| std::vector< double > | ioBursts, | ||
| int | priority = 0 |
||
| ) |
Definition at line 110 of file process.cpp.
| Process::Process | ( | const Process & | task | ) |
Definition at line 122 of file process.cpp.
| Process::~Process | ( | ) |
Definition at line 148 of file process.cpp.
| bool Process::advanceBurst | ( | ) |
Definition at line 173 of file process.cpp.
create the next job for a task
Definition at line 31 of file process.cpp.
|
static |
creates an "interactive" process
| cpuLambda | is the lambda parameter of the exponential distribution used to randomly generate the cpu bursts |
| ioLambda | is the lambda parameter of the exponential distribution used to randomly generate the io burst durations |
Definition at line 52 of file process.cpp.
|
static |
creates a real time task
| aow | amount of work to be performed by each job |
| T | period between two consecutive jobs are issued |
| dl | deadline, relative to the time at which the job was issued |
| pid | process identifier |
| priority | is for scheduling algos with prioirty lists |
| bcet | best vase execution time |
Definition at line 67 of file process.cpp.
| void Process::decrementBurst | ( | ) |
Definition at line 179 of file process.cpp.
|
static |
call this function before any other
call this function at the end of the simulation
Definition at line 103 of file process.cpp.
| double Process::getCurrentCpuAow | ( | ) | const |
Definition at line 184 of file process.cpp.
| double Process::getCurrentIoTime | ( | ) | const |
Definition at line 189 of file process.cpp.
| double Process::getDeadline | ( | ) | const |
Definition at line 227 of file process.cpp.
| double Process::getDeadlineTime | ( | ) | const |
Definition at line 251 of file process.cpp.
| unsigned int Process::getJobNumber | ( | ) | const |
Definition at line 287 of file process.cpp.
|
static |
returns the maximum number of process that can ever be created
This is needed by some MDP algorithms
Definition at line 94 of file process.cpp.
|
static |
returns new process identifier. The value returned gets incremented at each call
Definition at line 88 of file process.cpp.
| double Process::getPeriod | ( | ) | const |
Definition at line 246 of file process.cpp.
| int Process::getPid | ( | void | ) | const |
Definition at line 158 of file process.cpp.
| int Process::getPriority | ( | ) | const |
Definition at line 163 of file process.cpp.
| double Process::getWcet | ( | ) | const |
Definition at line 197 of file process.cpp.
| void Process::incrementJobNumber | ( | ) |
Definition at line 282 of file process.cpp.
| bool Process::isRealTime | ( | ) | const |
Definition at line 233 of file process.cpp.
| void Process::print | ( | std::ostream & | stream | ) | const |
Definition at line 256 of file process.cpp.
| void Process::setDeadlineTimeFromStartTime | ( | double | startTime | ) |
Definition at line 222 of file process.cpp.
| void Process::setDurationDistribution | ( | std::shared_ptr< Utils::BoundedRandomDistribution > | randomDist | ) |
Definition at line 153 of file process.cpp.
| void Process::setPowerCoeff | ( | double | coeff | ) |
Definition at line 293 of file process.cpp.
| void Process::setPriority | ( | int | pri | ) |
Definition at line 168 of file process.cpp.
|
static |
specify what random generator to use for interactive task length
Definition at line 99 of file process.cpp.
| void Process::setRtParams | ( | double | dl, |
| double | T, | ||
| double | wcet, | ||
| double | bcet | ||
| ) |
Definition at line 213 of file process.cpp.
| void Process::updateCurrentAow | ( | double | aow | ) |
Definition at line 241 of file process.cpp.
1.8.11