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
  • 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

      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 interface IScheduler
      Overrides:
      terminateProcess in class AbstractScheduler
    • getQueueLengthFor

      public int getQueueLengthFor(SimResourceInstance simResourceInstance)