java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.strategy.impl.AbstractScheduler
All Implemented Interfaces:
IScheduler
Direct Known Subclasses:
PreemptiveScheduler

public abstract class AbstractScheduler extends Object implements IScheduler
  • Field Details

  • Constructor Details

  • Method Details

    • forkNewProcess

      public void forkNewProcess(IActiveProcess process, IResourceInstance current)
      Description copied from interface: IScheduler
      Registers a new process and adds it to the scheduler's runqueue(s).
      Specified by:
      forkNewProcess in interface IScheduler
    • registerProcess

      public void registerProcess(IActiveProcess p, IResourceInstance instance)
      Specified by:
      registerProcess in interface IScheduler
    • terminateProcess

      public void terminateProcess(IActiveProcess process, IResourceInstance current)
      Specified by:
      terminateProcess in interface IScheduler
    • fromReadyToRunningOn

      protected void fromReadyToRunningOn(IActiveProcess process, IResourceInstance instance)
      Marks the given process as executing on the specified resource instance.
      Parameters:
      process -
      instance -
    • fromRunningToReady

      protected void fromRunningToReady(IActiveProcess process, IResourceInstance current, boolean inFront)
      Parameters:
      process -
    • fromRunningToWaiting

      public void fromRunningToWaiting(WaitingProcess waiting_process, Deque<de.uka.ipd.sdq.scheduler.processes.IWaitingProcess> waiting_queue, boolean in_front)
      Description copied from interface: IScheduler
      Notifies the scheduler, that a running process has to change its state to waiting. Takes care of the complete state change, including the insertion of the process into the waiting queue.
      Specified by:
      fromRunningToWaiting in interface IScheduler
      Parameters:
      waiting_process - Wrapper for the waiting process. Includes additional information about the waiting state.
      waiting_queue - The queue where the process has to wait.
      in_front - If true, the process is inserted at the front of the queue, otherwise it is inserted at the end.
    • fromWaitingToReady

      public void fromWaitingToReady(WaitingProcess waiting_process, Deque<de.uka.ipd.sdq.scheduler.processes.IWaitingProcess> waitingQueue, IResourceInstance current)
      Description copied from interface: IScheduler
      Notifies the scheduler, that a process finished its waiting period and becomes ready for execution. It takes care of the complete state change including the removal of the process from its waiting queue.
      Specified by:
      fromWaitingToReady in interface IScheduler
      Parameters:
      waiting_process - Wrapper for the waiting process.
      waitingQueue - Queue where the process is waiting.