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
public class PreemptiveScheduler extends AbstractScheduler
-
-
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
Constructors Constructor Description PreemptiveScheduler(de.uka.ipd.sdq.scheduler.SchedulerModel model, SimActiveResource resource, IQueueingStrategy queueingStrategy, boolean in_front_after_waiting, double scheduling_interval, StarvationBoost starvationBoost)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getInterval()
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 Detail
-
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 Detail
-
schedule
public void schedule(IResourceInstance instance)
Description copied from interface:IScheduler
Executes the next processes on the given resource instances.- Parameters:
instance
- Resource instance requesting scheduling.
-
scheduleNextEvent
public void scheduleNextEvent(IResourceInstance instance)
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
public boolean isIdle(IResourceInstance instance)
Description copied from interface:IScheduler
True, if the given resource has no running or pending jobs, otherwise false.- Returns:
-
getInterval
public double getInterval()
-
terminateProcess
public void terminateProcess(IActiveProcess process, IResourceInstance current)
- Specified by:
terminateProcess
in interfaceIScheduler
- Overrides:
terminateProcess
in classAbstractScheduler
-
getQueueLengthFor
public int getQueueLengthFor(SimResourceInstance simResourceInstance)
-
-