|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IScheduler
Scheduling strategy for an active resource. Called by each of its instances to schedule the next processes.
| Method Summary | |
|---|---|
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<WaitingProcess> 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<WaitingProcess> waiting_queue,
IResourceInstance current)
Notifies the scheduler, that a process finished its waiting period and becomes ready for execution. |
double |
getInterval()
|
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)
|
| Method Detail |
|---|
void schedule(IResourceInstance instance)
instance - Resource instance requesting scheduling.
void forkNewProcess(IActiveProcess process,
IResourceInstance current)
process -
void fromWaitingToReady(WaitingProcess waiting_process,
Deque<WaitingProcess> 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<WaitingProcess> 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||