public interface IScheduler
Modifier and Type | Method and Description |
---|---|
void |
forkNewProcess(IActiveProcess process,
IResourceInstance current)
Registers a new process and adds it to the scheduler's runqueue(s).
|
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.
|
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.
|
double |
getInterval() |
int |
getQueueLengthFor(SimResourceInstance simResourceInstance) |
boolean |
isIdle(IResourceInstance instance)
True, if the given resource has no running or pending jobs, otherwise false.
|
void |
registerProcess(IActiveProcess p,
IResourceInstance instance) |
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 lookUp,
IResourceInstance current) |
void schedule(IResourceInstance instance)
instance
- Resource instance requesting scheduling.void forkNewProcess(IActiveProcess process, IResourceInstance current)
process
- void fromWaitingToReady(WaitingProcess waiting_process, Deque<de.uka.ipd.sdq.scheduler.processes.IWaitingProcess> waiting_queue, IResourceInstance current)
waiting_process
- Wrapper for the waiting process.waiting_queue
- Queue where the process is waiting.void fromRunningToWaiting(WaitingProcess waiting_process, Deque<de.uka.ipd.sdq.scheduler.processes.IWaitingProcess> waiting_queue, boolean in_front)
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.void scheduleNextEvent(IResourceInstance instance)
instance
- Instance a new event is needed for.boolean isIdle(IResourceInstance instance)
instance
- double getInterval()
void terminateProcess(IActiveProcess lookUp, IResourceInstance current)
void registerProcess(IActiveProcess p, IResourceInstance instance)
int getQueueLengthFor(SimResourceInstance simResourceInstance)