All Known Implementing Classes:
AbstractScheduler, PreemptiveScheduler

public interface IScheduler
Scheduling strategy for an active resource. Called by each of its instances to schedule the next processes.
  • Method Details

    • schedule

      void schedule(IResourceInstance instance)
      Executes the next processes on the given resource instances.
      Parameters:
      instance - Resource instance requesting scheduling.
    • forkNewProcess

      void forkNewProcess(IActiveProcess process, IResourceInstance current)
      Registers a new process and adds it to the scheduler's runqueue(s).
      Parameters:
      process -
    • fromWaitingToReady

      void fromWaitingToReady(WaitingProcess waiting_process, Deque<de.uka.ipd.sdq.scheduler.processes.IWaitingProcess> waiting_queue, IResourceInstance current)
      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.
      Parameters:
      waiting_process - Wrapper for the waiting process.
      waiting_queue - Queue where the process is waiting.
    • fromRunningToWaiting

      void fromRunningToWaiting(WaitingProcess waiting_process, Deque<de.uka.ipd.sdq.scheduler.processes.IWaitingProcess> waiting_queue, boolean in_front)
      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.
      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.
    • scheduleNextEvent

      void scheduleNextEvent(IResourceInstance instance)
      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

      boolean isIdle(IResourceInstance instance)
      True, if the given resource has no running or pending jobs, otherwise false.
      Parameters:
      instance -
      Returns:
    • getInterval

      double getInterval()
    • terminateProcess

      void terminateProcess(IActiveProcess lookUp, IResourceInstance current)
    • registerProcess

      void registerProcess(IActiveProcess p, IResourceInstance instance)
    • getQueueLengthFor

      int getQueueLengthFor(SimResourceInstance simResourceInstance)