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
ConstructorDescriptionPreemptiveScheduler
(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 TypeMethodDescriptiondouble
int
getQueueLengthFor
(SimResourceInstance simResourceInstance) boolean
isIdle
(IResourceInstance instance) True, if the given resource has no running or pending jobs, otherwise false.void
schedule
(IResourceInstance instance) Executes the next processes on the given resource instances.void
scheduleNextEvent
(IResourceInstance instance) Schedules the next event for the specified resource instance.void
terminateProcess
(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:IScheduler
Executes the next processes on the given resource instances.- Parameters:
instance
- Resource instance requesting scheduling.
-
scheduleNextEvent
Description copied from interface:IScheduler
Schedules 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:IScheduler
True, if the given resource has no running or pending jobs, otherwise false.- Returns:
-
getInterval
public double getInterval() -
terminateProcess
- Specified by:
terminateProcess
in interfaceIScheduler
- Overrides:
terminateProcess
in classAbstractScheduler
-
getQueueLengthFor
-