gridsim
Class ResGridlet

Object
  |
  +--gridsim.ResGridlet

public class ResGridlet
extends Object

GridSim ResGridlet represents a Gridlet submitted to the resource for processing.

It contains a Gridlet object along with its arrival time and the ID of the machine and the PE (Processing Element) allocated to it. It acts as a placeholder for maintaining the amount of resource share allocated at various times for simulating time-shared and space-shared scheduling using internal events.

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

Constructor Summary
ResGridlet(Gridlet gridlet)
          Allocates a new ResGridlet object upon the arrival of a Gridlet object.
 
Method Summary
 double GetArrivalTime()
          Deprecated. As of GridSim 2.1, replaced by getGridletArrivalTime()
 double GetFinishTime()
          Deprecated. As of GridSim 2.1, replaced by getGridletFinishTime()
 Gridlet getGridlet()
          Get this Gridlet object
 Gridlet GetGridlet()
          Deprecated. As of GridSim 2.1, replaced by getGridlet()
 double getGridletArrivalTime()
          Get arrival time of a gridlet
 double getGridletFinishTime()
          Get the Gridlet's finish time
 int getMachineID()
          Get machine ID
 int GetMachineID()
          Deprecated. As of GridSim 2.1, replaced by getMachineID()
 int getPEID()
          Get PE ID
 int GetPEID()
          Deprecated. As of GridSim 2.1, replaced by getPEID()
 double getRemainingGridletLength()
          Get the remaining gridlet length
 double GetRemainingLength()
          Deprecated. As of GridSim 2.1, replaced by getRemainingGridletLength()
 void setFinishTimeForSpaceSharedResource(double availableRating)
          Determine Time by which this Gridlet can finish.
 void SetFinishTimeForSpaceSharedResource(double availableRating)
          Deprecated. As of GridSim 2.1, replaced by setFinishTimeForSpaceSharedResource(double)
 void setFinishTimeForTimeSharedResource(double availableRating, ResourceCalendar rCalendar)
          Determine Time by which this Gridlet can finish.
 void SetFinishTimeForTimeSharedResource(double availableRating, ResourceCalendar rCalendar)
          Deprecated. As of GridSim 2.1, replaced by setFinishTimeForTimeSharedResource(double, ResourceCalendar)
 void SetIDs(int machineID, int peID)
          Deprecated. As of GridSim 2.1, replaced by setMachineAndPEID(int, int)
 void setMachineAndPEID(int machineID, int peID)
          Set the machine and PE (Processing Element) ID
 void updateGridletFinishedSoFar(double miLength)
          A method that updates the length of gridlet that has been completed
 void UpdateGridletFinishedSoFar(double miLength)
          Deprecated. As of GridSim 2.1, replaced by updateGridletFinishedSoFar(double)
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResGridlet

public ResGridlet(Gridlet gridlet)
Allocates a new ResGridlet object upon the arrival of a Gridlet object. The arriving time is determined by GridSim.Clock()

Parameters:
gridlet - a gridlet object
See Also:
GridSim.Clock()
Pre Condition:
gridlet != null
Post Condition:
$none
Method Detail

SetIDs

public void SetIDs(int machineID,
                   int peID)
Deprecated. As of GridSim 2.1, replaced by setMachineAndPEID(int, int)

Set the machine and PE (Processing Element) ID

Parameters:
machineID - machine ID
peID - PE ID
Pre Condition:
machineID >= 0, peID >= 0
Post Condition:
$none

setMachineAndPEID

public void setMachineAndPEID(int machineID,
                              int peID)
Set the machine and PE (Processing Element) ID

Parameters:
machineID - machine ID
peID - PE ID
Pre Condition:
machineID >= 0, peID >= 0
Post Condition:
$none

GetMachineID

public int GetMachineID()
Deprecated. As of GridSim 2.1, replaced by getMachineID()

Get machine ID

Returns:
machine ID or -1 if it is not specified before
Pre Condition:
$none
Post Condition:
$result >= -1

getMachineID

public int getMachineID()
Get machine ID

Returns:
machine ID or -1 if it is not specified before
Pre Condition:
$none
Post Condition:
$result >= -1

GetPEID

public int GetPEID()
Deprecated. As of GridSim 2.1, replaced by getPEID()

Get PE ID

Returns:
PE ID or -1 if it is not specified before
Pre Condition:
$none
Post Condition:
$result >= -1

getPEID

public int getPEID()
Get PE ID

Returns:
PE ID or -1 if it is not specified before
Pre Condition:
$none
Post Condition:
$result >= -1

GetRemainingLength

public double GetRemainingLength()
Deprecated. As of GridSim 2.1, replaced by getRemainingGridletLength()

Get the remaining gridlet length

Returns:
gridlet length
Pre Condition:
$none
Post Condition:
$result >= 0

getRemainingGridletLength

public double getRemainingGridletLength()
Get the remaining gridlet length

Returns:
gridlet length
Pre Condition:
$none
Post Condition:
$result >= 0

UpdateGridletFinishedSoFar

public void UpdateGridletFinishedSoFar(double miLength)
Deprecated. As of GridSim 2.1, replaced by updateGridletFinishedSoFar(double)

A method that updates the length of gridlet that has been completed

Parameters:
miLength - gridlet length in Million Instructions (MI)
Pre Condition:
miLength >= 0.0
Post Condition:
$none

updateGridletFinishedSoFar

public void updateGridletFinishedSoFar(double miLength)
A method that updates the length of gridlet that has been completed

Parameters:
miLength - gridlet length in Million Instructions (MI)
Pre Condition:
miLength >= 0.0
Post Condition:
$none

GetArrivalTime

public double GetArrivalTime()
Deprecated. As of GridSim 2.1, replaced by getGridletArrivalTime()

Get arrival time of a gridlet

Returns:
arrival time
Pre Condition:
$none
Post Condition:
$result >= 0.0

getGridletArrivalTime

public double getGridletArrivalTime()
Get arrival time of a gridlet

Returns:
arrival time
Pre Condition:
$none
Post Condition:
$result >= 0.0

SetFinishTimeForTimeSharedResource

public void SetFinishTimeForTimeSharedResource(double availableRating,
                                               ResourceCalendar rCalendar)
                                        throws NullPointerException
Deprecated. As of GridSim 2.1, replaced by setFinishTimeForTimeSharedResource(double, ResourceCalendar)

Determine Time by which this Gridlet can finish.
NOTE: To be used by Time shared resources only.

Parameters:
availableRating - the available MIPS considering current hour load
rCalendar - Resourcce Calendar
Throws:
NullPointerException - if ResourceCalendar object is null
Pre Condition:
availableRating >= 0.0, rCalendar != null
Post Condition:
$none

setFinishTimeForTimeSharedResource

public void setFinishTimeForTimeSharedResource(double availableRating,
                                               ResourceCalendar rCalendar)
                                        throws NullPointerException
Determine Time by which this Gridlet can finish.
NOTE: To be used by Time shared resources only.

Parameters:
availableRating - the available MIPS considering current hour load
rCalendar - Resourcce Calendar
Throws:
NullPointerException - if ResourceCalendar object is null
Pre Condition:
availableRating >= 0.0, rCalendar != null
Post Condition:
$none

SetFinishTimeForSpaceSharedResource

public void SetFinishTimeForSpaceSharedResource(double availableRating)
Deprecated. As of GridSim 2.1, replaced by setFinishTimeForSpaceSharedResource(double)

Determine Time by which this Gridlet can finish.
NOTE: To be used by Space shared resources only.

Parameters:
availableRating - this is 100% availability of PE MIPS since it runs in dedicated mode
Pre Condition:
availableRating >= 0.0
Post Condition:
$none

setFinishTimeForSpaceSharedResource

public void setFinishTimeForSpaceSharedResource(double availableRating)
Determine Time by which this Gridlet can finish.
NOTE: To be used by Space shared resources only.

Parameters:
availableRating - this is 100% availability of PE MIPS since it runs in dedicated mode
Pre Condition:
availableRating >= 0.0
Post Condition:
$none

GetFinishTime

public double GetFinishTime()
Deprecated. As of GridSim 2.1, replaced by getGridletFinishTime()

Get the Gridlet's finish time

Returns:
finish time of a gridlet or -1.0 if it cannot finish in this hourly slot
Pre Condition:
$none
Post Condition:
$result >= -1.0

getGridletFinishTime

public double getGridletFinishTime()
Get the Gridlet's finish time

Returns:
finish time of a gridlet or -1.0 if it cannot finish in this hourly slot
Pre Condition:
$none
Post Condition:
$result >= -1.0

GetGridlet

public Gridlet GetGridlet()
Deprecated. As of GridSim 2.1, replaced by getGridlet()

Get this Gridlet object

Returns:
gridlet object
Pre Condition:
$none
Post Condition:
$result != null

getGridlet

public Gridlet getGridlet()
Get this Gridlet object

Returns:
gridlet object
Pre Condition:
$none
Post Condition:
$result != null