gridbroker
Class BrokerResource

Object
  extended bygridbroker.BrokerResource

public class BrokerResource
extends Object

BrokerResource class acts as a placeholder for the broker to maintain a detailed record on the resources it uses for processing user applications. It maintains resource characteristics, a list of Gridlets assigned to the resource, the actual amount of MIPS (Millions Instruction Per Second) available to the user, and a report on the Gridlets processed. These measurements help in extrapolating and predicating the resource performance from the user point of view and aid in scheduling job dynamically at runtime.

Version:
2.1, June 2003
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Field Summary
 GridletList glList
          List of Gridlets that are currently assigned to a resource
 double LatestLoad
          Denotes the latest load
 int NoOfGridletsDispatchedSoFar
          Number of Gridlets that are dispatched so far
 int NoOfGridletsFinishedSoFar
          Number of Gridlets that are finished so far
static int PARAM_GRIDLETS_COMMITTED_FOR_RESOURCE
          Gridlets that are committed
static int PARAM_GRIDLETS_FINISHED
          Gridlets that are finished
static int PARAM_GRIDLETS_ON_RESOURCE
          Gridlets on a resource
static int PARAM_PROCESSING_EXPENSES
          Processing expenses
 double ProcessingExpensesSoFar
          Processing expenses so far
 ResourceCharacteristics resource
          A ResourceCharacteristics object
 
Constructor Summary
BrokerResource(ResourceCharacteristics resObj, double latestLoad)
          Allocates a new BrokerResource object
 
Method Summary
 double ExpectedCompletionTime(Gridlet gl)
          Deprecated. As of GridBroker 2.1, replaced by getExpectedCompletionTime(Gridlet)
 double ExpectedProcessingCost(Gridlet gl)
          Deprecated. As of GridBroker 2.1, replaced by getExpectedProcessingCost(Gridlet)
 double FirstAvailableSlotTime()
          Deprecated. As of GridBroker 2.1, replaced by getFirstAvailableSlotTime()
 double getAvailableMI(double endTime)
          Gets the available MIs depending on resource load from the end time
 double GetAvailableMI(double endTime)
          Deprecated. As of GridBroker 2.1, replaced by getAvailableMI(double)
 double getAvailableMIPS_PreviousSchedule()
          Gets the available MIPS based on previous schedule
 double GetAvailableMIPS_PreviousSchedule()
          Deprecated. As of GridBroker 2.1, replaced by getAvailableMIPS_PreviousSchedule()
 double getAvailableMIPS()
          Gets the available MIPS
 double GetAvailableMIPS()
          Deprecated. As of GridBroker 2.1, replaced by getAvailableMIPS()
 double getAvailableMIPSPerPE()
          Identifies the actual MIPS available per PE (Processing Element)
 double GetAvailableMIPSPerPE()
          Deprecated. As of GridBroker 2.1, replaced by getAvailableMIPSPerPE()
 double getExpectedCompletionTime(Gridlet gl)
          Gets the expected Grid completion time given its current commitmements
 double getExpectedProcessingCost(Gridlet gl)
          Identifies an expected processing cost on the resource
 double getFirstAvailableSlotTime()
          Gets the time at which the first slot is available, considering the current committed Gridlets
 int getNumGridletCommitted()
          Gets the number of Gridlets committed
 int getNumGridletInExec()
          Gets the number of Gridlets in execution
 int getNumGridletInQueue()
          Gets the number of Gridlets in queue
 int getNumGridletInReady()
          Gets the number of Gridlets in ready
 double getParameterValue(int parameter)
          Gets the parameter value
 double GetParameterValue(int parameter)
          Deprecated. As of GridBroker 2.1, replaced by getParameterValue(int)
 double getRemainingTimePeriod(double endTime)
          Gets the number of System Time units (such as second) from the current time to the endTime (such as Deadline)
 double getResourceShareVariation()
          Gets the resource share since the last schedule.
 Accumulator getUnFinishedGridletLengthAccumulator()
          Gets an Accumulator object for the length of all gridlets to be completely processed.
 Accumulator GetUnFinishedGridletsLengthAccumulator()
          Deprecated. As of GridBroker 2.1, replaced by getUnFinishedGridletLengthAccumulator()
 boolean isSufficientMIAvailableOnSinglePE(Gridlet gl, double deadlineTime)
          Checks the available MI (Millions Instruction) on a single PE (Processing Element) within the available deadline period
 boolean IsSufficientMIAvailableOnSinglePE(Gridlet gl, double deadlineTime)
          Deprecated. As of GridBroker 2.1, replaced by isSufficientMIAvailableOnSinglePE(Gridlet, double)
 int NoOfGridletsCommitted()
          Deprecated. As of GridBroker 2.1, replaced by getNumGridletCommitted()
 int NoOfGridletsInExec()
          Deprecated. As of GridBroker 2.1, replaced by getNumGridletInExec()
 int NoOfGridletsInQueue()
          Deprecated. As of GridBroker 2.1, replaced by getNumGridletInQueue()
 int NoOfGridletsInReady()
          Deprecated. As of GridBroker 2.1, replaced by getNumGridletInReady()
 double RemainingTimePeriodFromNow(double endTime)
          Deprecated. As of GridBroker 2.1, replaced by getRemainingTimePeriod(double)
 double ResourceShareVariation()
          Deprecated. As of GridBroker 2.1, replaced by getResourceShareVariation()
 void setAvailableMIPS_PreviousSchedule()
          Sets the available MIPS based on previous schedule
 void SetAvailableMIPS_PreviousSchedule()
          Deprecated. As of GridBroker 2.1, replaced by setAvailableMIPS_PreviousSchedule()
 void updateAvailableMIPS(Gridlet glFinished, int brokerMaxGridletPerPELimit)
          Updates the total available MIPS
 void UpdateAvailableMIPS(Gridlet glFinished, int brokerMaxGridletPerPELimit)
          Deprecated. As of GridBroker 2.1, replaced by updateAvailableMIPS(Gridlet, int)
 void updateAvailableMIPSDuringSchedule()
          Updates the available MIPS during simulation schedule
 void UpdateAvailableMIPSDuringSchedule()
          Deprecated. As of GridBroker 2.1, replaced by updateAvailableMIPSDuringSchedule()
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

public ResourceCharacteristics resource
A ResourceCharacteristics object


LatestLoad

public double LatestLoad
Denotes the latest load


glList

public GridletList glList
List of Gridlets that are currently assigned to a resource


NoOfGridletsFinishedSoFar

public int NoOfGridletsFinishedSoFar
Number of Gridlets that are finished so far


NoOfGridletsDispatchedSoFar

public int NoOfGridletsDispatchedSoFar
Number of Gridlets that are dispatched so far


ProcessingExpensesSoFar

public double ProcessingExpensesSoFar
Processing expenses so far


PARAM_GRIDLETS_ON_RESOURCE

public static final int PARAM_GRIDLETS_ON_RESOURCE
Gridlets on a resource

See Also:
Constant Field Values

PARAM_GRIDLETS_COMMITTED_FOR_RESOURCE

public static final int PARAM_GRIDLETS_COMMITTED_FOR_RESOURCE
Gridlets that are committed

See Also:
Constant Field Values

PARAM_GRIDLETS_FINISHED

public static final int PARAM_GRIDLETS_FINISHED
Gridlets that are finished

See Also:
Constant Field Values

PARAM_PROCESSING_EXPENSES

public static final int PARAM_PROCESSING_EXPENSES
Processing expenses

See Also:
Constant Field Values
Constructor Detail

BrokerResource

public BrokerResource(ResourceCharacteristics resObj,
                      double latestLoad)
Allocates a new BrokerResource object

Parameters:
resObj - an object of ResourceCharacteristics
latestLoad - the latest resource load
See Also:
ResourceCharacteristics
Pre Condition:
resObj != null, latestLoad >= 0.0
Post Condition:
$none
Method Detail

GetParameterValue

public double GetParameterValue(int parameter)
Deprecated. As of GridBroker 2.1, replaced by getParameterValue(int)

Gets the parameter value

Parameters:
parameter - the type of a parameter
Returns:
the parameter value
Pre Condition:
parameter >= 1 && parameter <= 4
Post Condition:
$result >= 0.0

getParameterValue

public double getParameterValue(int parameter)
Gets the parameter value

Parameters:
parameter - the type of a parameter
Returns:
the parameter value
Pre Condition:
parameter >= 1 && parameter <= 4
Post Condition:
$result >= 0.0

GetAvailableMIPS

public double GetAvailableMIPS()
Deprecated. As of GridBroker 2.1, replaced by getAvailableMIPS()

Gets the available MIPS

Returns:
the available MIPS
Pre Condition:
$none
Post Condition:
$result >= 0

getAvailableMIPS

public double getAvailableMIPS()
Gets the available MIPS

Returns:
the available MIPS
Pre Condition:
$none
Post Condition:
$result >= 0

GetAvailableMIPS_PreviousSchedule

public double GetAvailableMIPS_PreviousSchedule()
Deprecated. As of GridBroker 2.1, replaced by getAvailableMIPS_PreviousSchedule()

Gets the available MIPS based on previous schedule

Returns:
the available MIPS
Pre Condition:
$none
Post Condition:
$result >= 0

getAvailableMIPS_PreviousSchedule

public double getAvailableMIPS_PreviousSchedule()
Gets the available MIPS based on previous schedule

Returns:
the available MIPS
Pre Condition:
$none
Post Condition:
$result >= 0

SetAvailableMIPS_PreviousSchedule

public void SetAvailableMIPS_PreviousSchedule()
Deprecated. As of GridBroker 2.1, replaced by setAvailableMIPS_PreviousSchedule()

Sets the available MIPS based on previous schedule

Pre Condition:
$none
Post Condition:
$none

setAvailableMIPS_PreviousSchedule

public void setAvailableMIPS_PreviousSchedule()
Sets the available MIPS based on previous schedule

Pre Condition:
$none
Post Condition:
$none

ResourceShareVariation

public double ResourceShareVariation()
Deprecated. As of GridBroker 2.1, replaced by getResourceShareVariation()

Gets the resource share since the last schedule. If the value is greater than 1, then higher share is available.

Returns:
the resource share
Pre Condition:
$none
Post Condition:
$result >= 0

getResourceShareVariation

public double getResourceShareVariation()
Gets the resource share since the last schedule. If the value is greater than 1, then higher share is available.

Returns:
the resource share or 0 if not available
Pre Condition:
$none
Post Condition:
$none

UpdateAvailableMIPS

public void UpdateAvailableMIPS(Gridlet glFinished,
                                int brokerMaxGridletPerPELimit)
Deprecated. As of GridBroker 2.1, replaced by updateAvailableMIPS(Gridlet, int)

Updates the total available MIPS

Parameters:
glFinished - a Gridlet object that has finished
brokerMaxGridletPerPELimit - the max. number of Gridlet per PE (Processing Element)
See Also:
Gridlet
Pre Condition:
glFinished != null, brokerMaxGridletPerPELimit >= 0
Post Condition:
$none

updateAvailableMIPS

public void updateAvailableMIPS(Gridlet glFinished,
                                int brokerMaxGridletPerPELimit)
Updates the total available MIPS

Parameters:
glFinished - a Gridlet object that has finished
brokerMaxGridletPerPELimit - the max. number of Gridlet per PE (Processing Element)
See Also:
Gridlet
Pre Condition:
glFinished != null, brokerMaxGridletPerPELimit >= 0
Post Condition:
$none

UpdateAvailableMIPSDuringSchedule

public void UpdateAvailableMIPSDuringSchedule()
Deprecated. As of GridBroker 2.1, replaced by updateAvailableMIPSDuringSchedule()

Updates the available MIPS during simulation schedule

Pre Condition:
$none
Post Condition:
$none

updateAvailableMIPSDuringSchedule

public void updateAvailableMIPSDuringSchedule()
Updates the available MIPS during simulation schedule

Pre Condition:
$none
Post Condition:
$none

GetAvailableMIPSPerPE

public double GetAvailableMIPSPerPE()
Deprecated. As of GridBroker 2.1, replaced by getAvailableMIPSPerPE()

Identifies the actual MIPS available per PE (Processing Element)

Returns:
the actual MPIS available for the current user
Pre Condition:
$none
Post Condition:
$result >= 0

getAvailableMIPSPerPE

public double getAvailableMIPSPerPE()
Identifies the actual MIPS available per PE (Processing Element)

Returns:
the actual MPIS available for the current user
Pre Condition:
$none
Post Condition:
$result >= 0

FirstAvailableSlotTime

public double FirstAvailableSlotTime()
Deprecated. As of GridBroker 2.1, replaced by getFirstAvailableSlotTime()

Gets the time at which the first slot is available, considering the current committed Gridlets

Returns:
the available time
Pre Condition:
$none
Post Condition:
$result >= 0

getFirstAvailableSlotTime

public double getFirstAvailableSlotTime()
Gets the time at which the first slot is available, considering the current committed Gridlets

Returns:
the available time
Pre Condition:
$none
Post Condition:
$result >= 0

ExpectedCompletionTime

public double ExpectedCompletionTime(Gridlet gl)
Deprecated. As of GridBroker 2.1, replaced by getExpectedCompletionTime(Gridlet)

Gets the expected Grid completion time given its current commitmements

Parameters:
gl - a Gridlet object
Returns:
the expected completion time
Pre Condition:
gl != null
Post Condition:
$result >= 0

getExpectedCompletionTime

public double getExpectedCompletionTime(Gridlet gl)
Gets the expected Grid completion time given its current commitmements

Parameters:
gl - a Gridlet object
Returns:
the expected completion time
Pre Condition:
gl != null
Post Condition:
$result >= 0

GetUnFinishedGridletsLengthAccumulator

public Accumulator GetUnFinishedGridletsLengthAccumulator()
Deprecated. As of GridBroker 2.1, replaced by getUnFinishedGridletLengthAccumulator()

Gets an Accumulator object for the length of all gridlets to be completely processed. It is also include all gridlets for a Broker Resource that either in READY, QUEUED, or in INEXEC state.

Returns:
an Accumulator object
See Also:
Accumulator
Pre Condition:
$none
Post Condition:
$result != null

getUnFinishedGridletLengthAccumulator

public Accumulator getUnFinishedGridletLengthAccumulator()
Gets an Accumulator object for the length of all gridlets to be completely processed. It is also include all gridlets for a Broker Resource that either in READY, QUEUED, or in INEXEC state.

Returns:
an Accumulator object
See Also:
Accumulator
Pre Condition:
$none
Post Condition:
$result != null

RemainingTimePeriodFromNow

public double RemainingTimePeriodFromNow(double endTime)
Deprecated. As of GridBroker 2.1, replaced by getRemainingTimePeriod(double)

Gets the number of System Time units (such as second) from the current time to the endTime (such as Deadline)

Parameters:
endTime - the ending time
Returns:
the remainding time period
Pre Condition:
endTime >= 0.0
Post Condition:
$result >= 0

getRemainingTimePeriod

public double getRemainingTimePeriod(double endTime)
Gets the number of System Time units (such as second) from the current time to the endTime (such as Deadline)

Parameters:
endTime - the ending time
Returns:
the remainding time period
Pre Condition:
endTime >= 0.0
Post Condition:
$result >= 0

IsSufficientMIAvailableOnSinglePE

public boolean IsSufficientMIAvailableOnSinglePE(Gridlet gl,
                                                 double deadlineTime)
Deprecated. As of GridBroker 2.1, replaced by isSufficientMIAvailableOnSinglePE(Gridlet, double)

Checks the available MI (Millions Instruction) on a single PE (Processing Element) within the available deadline period

Parameters:
gl - a Gridlet object
deadlineTime - the deadline time period
Returns:
true if it is sufficient for a Gridlet to run successfully, otherwise false
See Also:
Gridlet
Pre Condition:
$none
Post Condition:
$none

isSufficientMIAvailableOnSinglePE

public boolean isSufficientMIAvailableOnSinglePE(Gridlet gl,
                                                 double deadlineTime)
Checks the available MI (Millions Instruction) on a single PE (Processing Element) within the available deadline period

Parameters:
gl - a Gridlet object
deadlineTime - the deadline time period
Returns:
true if it is sufficient for a Gridlet to run successfully, otherwise false
See Also:
Gridlet
Pre Condition:
$none
Post Condition:
$none

GetAvailableMI

public double GetAvailableMI(double endTime)
Deprecated. As of GridBroker 2.1, replaced by getAvailableMI(double)

Gets the available MIs depending on resource load from the end time

Parameters:
endTime - the end time
Returns:
the available MIs
Pre Condition:
endTime >= 0.0
Post Condition:
$result >= 0.0

getAvailableMI

public double getAvailableMI(double endTime)
Gets the available MIs depending on resource load from the end time

Parameters:
endTime - the end time
Returns:
the available MIs
Pre Condition:
endTime >= 0.0
Post Condition:
$result >= 0.0

NoOfGridletsCommitted

public int NoOfGridletsCommitted()
Deprecated. As of GridBroker 2.1, replaced by getNumGridletCommitted()

Gets the number of Gridlets committed

Returns:
the number of Gridlets committed
Pre Condition:
$none
Post Condition:
$result >= 0

getNumGridletCommitted

public int getNumGridletCommitted()
Gets the number of Gridlets committed

Returns:
the number of Gridlets committed
Pre Condition:
$none
Post Condition:
$result >= 0

NoOfGridletsInReady

public int NoOfGridletsInReady()
Deprecated. As of GridBroker 2.1, replaced by getNumGridletInReady()

Gets the number of Gridlets in ready

Returns:
the number of Gridlets in ready
Pre Condition:
$none
Post Condition:
$result >= 0

getNumGridletInReady

public int getNumGridletInReady()
Gets the number of Gridlets in ready

Returns:
the number of Gridlets in ready
Pre Condition:
$none
Post Condition:
$result >= 0

NoOfGridletsInQueue

public int NoOfGridletsInQueue()
Deprecated. As of GridBroker 2.1, replaced by getNumGridletInQueue()

Gets the number of Gridlets in queue

Returns:
the number of Gridlets in queue
Pre Condition:
$none
Post Condition:
$result >= 0

getNumGridletInQueue

public int getNumGridletInQueue()
Gets the number of Gridlets in queue

Returns:
the number of Gridlets in queue
Pre Condition:
$none
Post Condition:
$result >= 0

NoOfGridletsInExec

public int NoOfGridletsInExec()
Deprecated. As of GridBroker 2.1, replaced by getNumGridletInExec()

Gets the number of Gridlets in execution

Returns:
the number of Gridlets in execution
Pre Condition:
$none
Post Condition:
$result >= 0

getNumGridletInExec

public int getNumGridletInExec()
Gets the number of Gridlets in execution

Returns:
the number of Gridlets in execution
Pre Condition:
$none
Post Condition:
$result >= 0

ExpectedProcessingCost

public double ExpectedProcessingCost(Gridlet gl)
Deprecated. As of GridBroker 2.1, replaced by getExpectedProcessingCost(Gridlet)

Identifies an expected processing cost on the resource

Parameters:
gl - a Gridlet object
Returns:
the expected processing cost or 0 if a Grid resource or Gridlet is empty
See Also:
Gridlet
Pre Condition:
gl != null
Post Condition:
$result >= 0.0

getExpectedProcessingCost

public double getExpectedProcessingCost(Gridlet gl)
Identifies an expected processing cost on the resource

Parameters:
gl - a Gridlet object
Returns:
the expected processing cost or 0 if a Grid resource or Gridlet is empty
See Also:
Gridlet
Pre Condition:
gl != null
Post Condition:
$result >= 0.0