Class BrokerResource

java.lang.Object
  |
  +--BrokerResource

class BrokerResource
extends java.lang.Object

A class that maintains Resource details and Gridlets assigned to it. It is used extensively in GridBroker class.


Field Summary
 gridsim.GridletList glList
           
 double LatestLoad
           
 int NoOfGridletsDispatchedSoFar
           
 int NoOfGridletsFinishedSoFar
           
static int PARAM_GRIDLETS_COMMITTED_FOR_RESOURCE
           
static int PARAM_GRIDLETS_FINISHED
           
static int PARAM_GRIDLETS_ON_RESOURCE
           
static int PARAM_PROCESSING_EXPENSES
           
 double ProcessingExpensesSoFar
           
 gridsim.ResourceCharacteristics resource
           
 
Constructor Summary
BrokerResource(gridsim.ResourceCharacteristics resource, double LatestLoad)
           
 
Method Summary
 double ExpectedCompletionTime(gridsim.Gridlet gl)
           
 double ExpectedProcessingCost(gridsim.Gridlet gl)
          Identify an expected processing cost on the resource
 double FirstAvailableSlotTime()
           
 double GetAvailableMI(double EndTime)
          Returns available MIs depending on resource load from current time.
 double GetAvailableMIPS_PreviousSchedule()
           
 double GetAvailableMIPS()
           
 double GetAvailableMIPSPerPE()
          Identify Actual MIPS available Per PE.
 double GetParameterValue(int parameter)
           
 gridsim.Accumulator GetUnFinishedGridletsLengthAccumulator()
          An accumulator of the length of all gridlets to be completely processed.
 boolean IsSufficientMIAvailableOnSinglePE(gridsim.Gridlet gl, double deadlineTime)
          This module checks available MI on a single PE within available deadline period is sufficient for a Gridlet to run successful.
 int NoOfGridletsCommitted()
           
 int NoOfGridletsInExec()
           
 int NoOfGridletsInQueue()
           
 int NoOfGridletsInReady()
           
 double RemainingTimePeriodFromNow(double EndTime)
          It returns Number of System Time Units (say Sec.) from current time to the EndTime (say Deadline)
 double ResourceShareVariation()
          Chnage in resource share since the last schedule.
 void SetAvailableMIPS_PreviousSchedule()
           
 void UpdateAvailableMIPS(gridsim.Gridlet glFinished, int BrokerMaxGridletPerPELimit)
          Update Total Available MIPS
 void UpdateAvailableMIPSDuringSchedule()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

public gridsim.ResourceCharacteristics resource

glList

public gridsim.GridletList glList

LatestLoad

public double LatestLoad

NoOfGridletsFinishedSoFar

public int NoOfGridletsFinishedSoFar

NoOfGridletsDispatchedSoFar

public int NoOfGridletsDispatchedSoFar

ProcessingExpensesSoFar

public double ProcessingExpensesSoFar

PARAM_GRIDLETS_ON_RESOURCE

public static final int PARAM_GRIDLETS_ON_RESOURCE
See Also:
Constant Field Values

PARAM_GRIDLETS_COMMITTED_FOR_RESOURCE

public static final int PARAM_GRIDLETS_COMMITTED_FOR_RESOURCE
See Also:
Constant Field Values

PARAM_GRIDLETS_FINISHED

public static final int PARAM_GRIDLETS_FINISHED
See Also:
Constant Field Values

PARAM_PROCESSING_EXPENSES

public static final int PARAM_PROCESSING_EXPENSES
See Also:
Constant Field Values
Constructor Detail

BrokerResource

public BrokerResource(gridsim.ResourceCharacteristics resource,
                      double LatestLoad)
Method Detail

GetParameterValue

public double GetParameterValue(int parameter)

GetAvailableMIPS

public double GetAvailableMIPS()

GetAvailableMIPS_PreviousSchedule

public double GetAvailableMIPS_PreviousSchedule()

SetAvailableMIPS_PreviousSchedule

public void SetAvailableMIPS_PreviousSchedule()

ResourceShareVariation

public double ResourceShareVariation()
Chnage in resource share since the last schedule. > 1 means, higher share is available.


UpdateAvailableMIPS

public void UpdateAvailableMIPS(gridsim.Gridlet glFinished,
                                int BrokerMaxGridletPerPELimit)
Update Total Available MIPS


UpdateAvailableMIPSDuringSchedule

public void UpdateAvailableMIPSDuringSchedule()

GetAvailableMIPSPerPE

public double GetAvailableMIPSPerPE()
Identify Actual MIPS available Per PE.


FirstAvailableSlotTime

public double FirstAvailableSlotTime()
Returns:
the time at which the first slot is available considering current Gridlets committed.

ExpectedCompletionTime

public double ExpectedCompletionTime(gridsim.Gridlet gl)
Returns:
the expected Grid completion time given its current committements.

GetUnFinishedGridletsLengthAccumulator

public gridsim.Accumulator GetUnFinishedGridletsLengthAccumulator()
An accumulator of the length of all gridlets to be completely processed. It included all gridlets for a Broker Resource that either in READY, QUEUED, or in INEXEC state.


RemainingTimePeriodFromNow

public double RemainingTimePeriodFromNow(double EndTime)
It returns Number of System Time Units (say Sec.) from current time to the EndTime (say Deadline)


IsSufficientMIAvailableOnSinglePE

public boolean IsSufficientMIAvailableOnSinglePE(gridsim.Gridlet gl,
                                                 double deadlineTime)
This module checks available MI on a single PE within available deadline period is sufficient for a Gridlet to run successful. if yes, it returns TRUE otherwise, false.


GetAvailableMI

public double GetAvailableMI(double EndTime)
Returns available MIs depending on resource load from current time.


NoOfGridletsCommitted

public int NoOfGridletsCommitted()

NoOfGridletsInReady

public int NoOfGridletsInReady()

NoOfGridletsInQueue

public int NoOfGridletsInQueue()

NoOfGridletsInExec

public int NoOfGridletsInExec()

ExpectedProcessingCost

public double ExpectedProcessingCost(gridsim.Gridlet gl)
Identify an expected processing cost on the resource

Parameters:
gl - Gridlet object.
Returns:
an expected processing cost on the resource