Scheduler
Public Member Functions | List of all members
Scheduler::SchedulingSimulator Class Reference

#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< ProcesscreateRealTimeTask (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...
 

Detailed Description

Definition at line 28 of file schedulingSimulator.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

void SchedulingSimulator::createInteractiveProcess ( double  startTime)

creates a new interactive process event and adds it to the event scheduling queue

Parameters
startTimethe 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

Parameters
startTimethe time at which the first job spawns
periodthe interval at which jobs are spawned
wcetthe 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.
deadlinethe 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
isRandomdetermines if the amount of work is random. In that case wcet is the worst-case amount of work
bcetbest case amount of work

Definition at line 132 of file schedulingSimulator.cpp.

void SchedulingSimulator::endSimulation ( double  time)

set the end of the simulation

Parameters
timethe 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

Parameters
seedThe 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.

Parameters
startthe time at which the first timer gets off
intervalthe 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

Parameters
startthe time at which the scheduler is invoked for the first time
intervalthe interval at which the timer is invoked

Definition at line 188 of file schedulingSimulator.cpp.

void SchedulingSimulator::setStatsTick ( double  start,
double  interval 
)
Parameters
startthe time at which the first timeout occurs
intervalthe interval at which the next timeouts appear
See also
StatsTick

Definition at line 174 of file schedulingSimulator.cpp.

void SchedulingSimulator::setUsageCalculationTimeout ( double  start,
double  interval 
)

Sets a UsageUpdate timeout.

Parameters
startthe time at which the first timeout occurs
intervalthe interval at which the next timeouts will occur
See also
UsageUpdate

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

Parameters
startthe time at which to start the processor

Definition at line 235 of file schedulingSimulator.cpp.


The documentation for this class was generated from the following files: