Class PreemptiveScheduler
java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.strategy.impl.AbstractScheduler
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.strategy.impl.PreemptiveScheduler
- All Implemented Interfaces:
IScheduler
-
Field Summary
Fields inherited from class edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.strategy.impl.AbstractScheduler
queueing_strategy, resource, scheduling_interval, starvationBoost -
Constructor Summary
ConstructorsConstructorDescriptionPreemptiveScheduler(de.uka.ipd.sdq.scheduler.SchedulerModel model, SimActiveResource resource, IQueueingStrategy queueingStrategy, boolean in_front_after_waiting, double scheduling_interval, StarvationBoost starvationBoost) -
Method Summary
Modifier and TypeMethodDescriptiondoubleintgetQueueLengthFor(SimResourceInstance simResourceInstance) booleanisIdle(IResourceInstance instance) True, if the given resource has no running or pending jobs, otherwise false.voidschedule(IResourceInstance instance) Executes the next processes on the given resource instances.voidscheduleNextEvent(IResourceInstance instance) Schedules the next event for the specified resource instance.voidterminateProcess(IActiveProcess process, IResourceInstance current) Methods inherited from class edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.strategy.impl.AbstractScheduler
forkNewProcess, fromReadyToRunningOn, fromRunningToReady, fromRunningToWaiting, fromWaitingToReady, registerProcess
-
Constructor Details
-
PreemptiveScheduler
public PreemptiveScheduler(de.uka.ipd.sdq.scheduler.SchedulerModel model, SimActiveResource resource, IQueueingStrategy queueingStrategy, boolean in_front_after_waiting, double scheduling_interval, StarvationBoost starvationBoost)
-
-
Method Details
-
schedule
Description copied from interface:ISchedulerExecutes the next processes on the given resource instances.- Parameters:
instance- Resource instance requesting scheduling.
-
scheduleNextEvent
Description copied from interface:ISchedulerSchedules the next event for the specified resource instance. Assumes that the running process of the instance is set correctly.- Parameters:
instance- Instance a new event is needed for.
-
isIdle
Description copied from interface:ISchedulerTrue, if the given resource has no running or pending jobs, otherwise false.- Returns:
-
getInterval
public double getInterval() -
terminateProcess
- Specified by:
terminateProcessin interfaceIScheduler- Overrides:
terminateProcessin classAbstractScheduler
-
getQueueLengthFor
-