Package de.uka.ipd.sdq.scheduler
Interface IActiveResource
-
- All Known Implementing Classes:
AbstractActiveResource,SimDelayResource,SimFCFSResource,SimProcessorSharingResource,SimProcessorSharingResourceLinuxO1,SimProcessorSharingResourceWindows
public interface IActiveResourceAn active resource can execute demands of schedulable processes. Active resources are shared by multiple processes so that they need to use scheduling strategies to assign processing time of the resources to processes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddObserver(IActiveResourceStateSensor observer)StringgetId()Unique identifier of the resource.StringgetName()Name of the resource.intgetQueueLengthFor(SchedulerEntity schedulerEntity, int coreID)Get the number of processes currently having requests issued to this resource and waiting for the request to complete.doublegetRemainingDemand(ISchedulableProcess process)Returns the remaining demand for a process.voidnotifyTerminated(ISchedulableProcess simProcess)voidprocess(ISchedulableProcess process, int resourceServiceId, Map<String,Serializable> parameterMap, double demand)Processes the specified demand of the process.voidregisterProcess(ISchedulableProcess runningProcess)voidremoveObserver(IActiveResourceStateSensor observer)voidstart()Creates the initial events for the resource.voidstop()voidupdateDemand(ISchedulableProcess process, double demand)Update (currently consuming) demand for a process.
-
-
-
Method Detail
-
process
void process(ISchedulableProcess process, int resourceServiceId, Map<String,Serializable> parameterMap, double demand)
Processes the specified demand of the process. With additional parameters for the resource.
-
getRemainingDemand
double getRemainingDemand(ISchedulableProcess process)
Returns the remaining demand for a process.
-
updateDemand
void updateDemand(ISchedulableProcess process, double demand)
Update (currently consuming) demand for a process.
-
start
void start()
Creates the initial events for the resource.
-
getId
String getId()
Unique identifier of the resource.- Returns:
-
getName
String getName()
Name of the resource.- Returns:
-
stop
void stop()
-
registerProcess
void registerProcess(ISchedulableProcess runningProcess)
-
notifyTerminated
void notifyTerminated(ISchedulableProcess simProcess)
-
getQueueLengthFor
int getQueueLengthFor(SchedulerEntity schedulerEntity, int coreID)
Get the number of processes currently having requests issued to this resource and waiting for the request to complete.- Parameters:
schedulerEntity-- Returns:
-
addObserver
void addObserver(IActiveResourceStateSensor observer)
-
removeObserver
void removeObserver(IActiveResourceStateSensor observer)
-
-