public interface IRunQueue
| Modifier and Type | Method and Description |
|---|---|
void |
addProcess(IActiveProcess process,
boolean inFront)
Adds a process to the runqueue.
|
boolean |
contains(IActiveProcess process) |
boolean |
containsPending(IActiveProcess process) |
boolean |
containsRunning(IActiveProcess process)
Checks if the runqueue contains a running process.
|
IRunQueue |
createNewInstance()
Prototype Object Pattern.
|
IProcessQueue |
getBestRunnableQueue(IResourceInstance instance) |
int |
getCurrentLoad()
Returns the current number of processes in the ready queues.
|
IActiveProcess |
getNextRunnableProcess()
Returns the next runnable process.
|
IActiveProcess |
getNextRunnableProcess(IResourceInstance instance)
Returns the next process runnable on the given instance.
|
List<IActiveProcess> |
getStarvingProcesses(double starvationLimit) |
double |
getWaitingTime(IActiveProcess process) |
List<IActiveProcess> |
identifyMovableProcesses(IResourceInstance targetInstance,
boolean prio_increasing,
boolean queue_ascending,
int processes_needed)
Composes a list of processes movable to the specified target.
|
boolean |
isEmpty() |
boolean |
isIdle(IResourceInstance instance)
True, if there is no process running on the given resource.
|
boolean |
processStarving(double threshold) |
boolean |
removePendingProcess(IActiveProcess process)
Removes a process from the pending queue of the runqueue, i.e.
|
boolean |
removeProcess(IActiveProcess process)
Removes a process from the runqueue.
|
void |
removeRunning(IActiveProcess process)
Removes a running process from the runqueue.
|
void |
resetStarvationInfo() |
IResourceInstance |
runningOn(IActiveProcess process) |
void |
setRunningOn(IActiveProcess process,
IResourceInstance instance)
Sets the given process as running on the specified instance.
|
void |
setWaitingTime(IActiveProcess process,
double waiting) |
int getCurrentLoad()
IActiveProcess getNextRunnableProcess(IResourceInstance instance)
IActiveProcess getNextRunnableProcess()
boolean isEmpty()
boolean removeProcess(IActiveProcess process)
process - void addProcess(IActiveProcess process, boolean inFront)
inFront - If true, the process is added at the beginning of its queue,
otherwise it is added at the queue's end.IRunQueue createNewInstance()
IProcessQueue getBestRunnableQueue(IResourceInstance instance)
instance - Resource instance a process is needed for.List<IActiveProcess> identifyMovableProcesses(IResourceInstance targetInstance, boolean prio_increasing, boolean queue_ascending, int processes_needed)
targetInstance - Resource instance the processes shall be moved to.prio_increasing - If true, the processes in the resulting list are ordered with
an increasing priority, otherwise with a decreasing priority.queue_ascending - If true, processes in the resulting list are in the same order
as in the queue, otherwise they are in reverse order.processes_needed - The maximum number of processes needed for the resource.boolean contains(IActiveProcess process)
process - Process of interest.boolean removePendingProcess(IActiveProcess process)
process - Process of interest.boolean containsPending(IActiveProcess process)
process - Process of interest.void removeRunning(IActiveProcess process)
process - Process of interest.boolean containsRunning(IActiveProcess process)
process - Process of interest.void setRunningOn(IActiveProcess process, IResourceInstance instance)
process - Process to run.instance - Instance the process shall run on.IResourceInstance runningOn(IActiveProcess process)
process - Process of interest.boolean isIdle(IResourceInstance instance)
instance - boolean processStarving(double threshold)
double getWaitingTime(IActiveProcess process)
void setWaitingTime(IActiveProcess process, double waiting)
List<IActiveProcess> getStarvingProcesses(double starvationLimit)
void resetStarvationInfo()