Interface IActiveProcess
- All Superinterfaces:
de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
,de.uka.ipd.sdq.scheduler.IRunningProcess
- All Known Implementing Classes:
ActiveProcess
,PreemptiveProcess
,ProcessWithPriority
public interface IActiveProcess
extends de.uka.ipd.sdq.scheduler.IRunningProcess
Not externally visible methods for running processes.
-
Field Summary
Fields inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
NULL
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancels an already scheduled ProceedEvent, e.g.boolean
checkAffinity
(IResourceInstance instance) Checks if the given instance is in the set of affinity instances of the process.createNewInstance
(de.uka.ipd.sdq.scheduler.ISchedulableProcess process) double
de.uka.ipd.sdq.scheduler.processes.PROCESS_STATE
getState()
double
boolean
boolean
boolean
boolean
isIdealInstance
(IResourceInstance instance) Checks if the given instance is the ideal instance of the process.boolean
isLastInstance
(IResourceInstance instance) boolean
isMovable
(IResourceInstance targetInstance) boolean
isReady()
boolean
boolean
void
removeNonAffineInstances
(List<IResourceInstance> instance_list) Removes all instances the process is not allowed to run on from the given list.void
scheduleProceedEvent
(IScheduler scheduler) Schedules a proceed event for the process at the time the current demand is expired.void
setAffineInstances
(List<IResourceInstance> instance_list) Sets the affine instances for the process.void
setCurrentDemand
(double new_demand) Sets the new demand for a process.void
setDelayedAction
(IDelayedAction action) Sets a delayed action for the process, that need to be executed as soon as the process is running.void
setIdealInstance
(IResourceInstance instance) Sets the ideal instance of the process.void
setLastInstance
(IResourceInstance instance) Sets the instance the process is or just was running on.void
setReady()
Change the current state of the process to ready.void
Change the current state of the process to running.void
setRunQueue
(IRunQueue runqueue) Sets the current runqueue of the process.void
Change the current state of the process to waiting.void
toNow()
Proceeds all timing variables to the current simulation time.void
update()
Updates the process's timeslice and priority, if there is such.void
wasMovedTo
(IResourceInstance dest) Methods inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
isScheduled, reschedule
Methods inherited from interface de.uka.ipd.sdq.scheduler.IRunningProcess
addStateSensor, getId, getName, getSchedulableProcess, removeStateSensor
-
Method Details
-
getRunQueue
IRunQueue getRunQueue()- Returns:
- Returns the current runqueue of the process. NULL if the process is in no runqueue.
-
setRunQueue
Sets the current runqueue of the process.- Parameters:
runqueue
-
-
getState
de.uka.ipd.sdq.scheduler.processes.PROCESS_STATE getState()- Returns:
- Returns the current state of the process.
-
setRunning
void setRunning()Change the current state of the process to running. -
setReady
void setReady()Change the current state of the process to ready. -
setWaiting
void setWaiting()Change the current state of the process to waiting. -
isRunning
boolean isRunning()- Returns:
- True, if the process is in the running state, otherwise false.
-
isReady
boolean isReady()- Returns:
- True, if the process is in the ready state, otherwise false.
-
isWaiting
boolean isWaiting()- Returns:
- True, if the process is in the waiting state, otherwise false.
-
getCurrentDemand
double getCurrentDemand()- Returns:
- Returns the current demand of the process.
-
setCurrentDemand
void setCurrentDemand(double new_demand) Sets the new demand for a process. In order to do so, the current demand must be zero, i.e. has been completely processed.- Parameters:
new_demand
-
-
toNow
void toNow()Proceeds all timing variables to the current simulation time. The current demand is reduced only, if the process is in running state. -
setAffineInstances
Sets the affine instances for the process. The process is only allowed to run on these instances. If the list is set to NULL the process can run on any instance.- Parameters:
instance_list
-
-
hasAffinityList
boolean hasAffinityList()- Returns:
- True, if the process has a list of affinity instances, otherwise false.
-
checkAffinity
Checks if the given instance is in the set of affinity instances of the process.- Parameters:
instance
-- Returns:
-
removeNonAffineInstances
Removes all instances the process is not allowed to run on from the given list.- Parameters:
instance_list
-
-
setIdealInstance
Sets the ideal instance of the process. That is the instance most preferred for the process.- Parameters:
instance
-
-
hasIdealInstance
boolean hasIdealInstance()- Returns:
- True, if the process has an ideal instance, otherwise false.
-
isIdealInstance
Checks if the given instance is the ideal instance of the process.- Parameters:
instance
-- Returns:
- True, if the instance is the process' ideal instance, otherwise false.
-
getIdealInstance
IResourceInstance getIdealInstance()- Returns:
- Returns the ideal instance of the process.
-
setLastInstance
Sets the instance the process is or just was running on.- Parameters:
instance
-
-
hasLastInstance
boolean hasLastInstance()- Returns:
- True, if the last instance of the process is set.
-
getLastInstance
IResourceInstance getLastInstance()- Returns:
- If the process is in running state, the method returns the instance the process is currently running on. Otherwise, the instance the process was recently running on is returned.
-
isLastInstance
- Parameters:
instance
-- Returns:
- True, if the given instance is equal to the last instance of the process.
-
scheduleProceedEvent
Schedules a proceed event for the process at the time the current demand is expired. -
cancelProceedEvent
void cancelProceedEvent()Cancels an already scheduled ProceedEvent, e.g. if the process is interrupted. -
getTimeUntilNextInterruption
double getTimeUntilNextInterruption()- Returns:
- Returns the time the process will be interrupted next.
-
setDelayedAction
Sets a delayed action for the process, that need to be executed as soon as the process is running. Only one delayed action at a time is allowed.- Parameters:
action
-
-
update
void update()Updates the process's timeslice and priority, if there is such. -
createNewInstance
-
isMovable
-
wasMovedTo
-