29 file.open(
"processes.txt", std::ios_base::app);
41 return "New interactive process";
44 std::shared_ptr<Process> NewInteractiveProcess::createTask()
46 double cpuLambda = 1.0/5.0;
47 double ioLambda = 1.0/10.0;
52 void NewInteractiveProcess::scheduleNextEvent()
58 double lambda = 1.0/150.0;
63 }
while(interval >= std::numeric_limits<double>::infinity());
64 std::shared_ptr<Event> e = std::make_shared<NewInteractiveProcess>(
time+interval,
false);
std::shared_ptr< Process > task
virtual void print()
print information about the event
Utils::RandomGenerator * getRandomGenerator()
get the random generator
std::string getName() override
get the name of the event
void queueProcess(std::shared_ptr< Process > p)
static System * getInstance()
static std::shared_ptr< Process > createProcess(double cpuLambda, double ioLambda)
creates an "interactive" process
void scheduleTask(TriggeringEvent trigger)
This function is the scheduler. When called, it schedule the task to be executed on the processor ama...
TaskScheduler * getScheduler()
returns the task scheduler object
std::shared_ptr< Event > insert(std::shared_ptr< Event > e)
double drawExp(double lambda)
TriggeringEvent eventType
The event type is need by the scheduling discipline, to determine if this kind of event triggers invo...
void process() override
handle the the event TODO: 'process' is maybe not the best word for that, given that our simulator ac...
static EventList * getInstance()
Singleton pattern.