|
GridSim v3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectgridsim.ResGridlet
GridSim ResGridlet represents a Gridlet submitted to GridResource for
processing. This class keeps track the time for all activities in the
GridResource for a specific Gridlet. Before a Gridlet exits the
GridResource, it is RECOMMENDED to call this method
finalizeGridlet()
.
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 any scheduling using internal events.
Constructor Summary | |
ResGridlet(Gridlet gridlet)
Allocates a new ResGridlet object upon the arrival of a Gridlet object. |
|
ResGridlet(Gridlet gridlet,
long startTime,
int duration,
int reservID)
Allocates a new ResGridlet object upon the arrival of a Gridlet object. |
Method Summary | |
void |
finalizeGridlet()
Finalizes all relevant information before exiting the GridResource entity. |
double |
GetArrivalTime()
Deprecated. As of GridSim 2.1, replaced by getGridletArrivalTime() |
int |
getDurationTime()
Gets the reservation duration time. |
double |
getExecStartTime()
Gets the Gridlet's execution start time |
double |
GetFinishTime()
Deprecated. As of GridSim 2.1, replaced by getGridletFinishTime() |
Gridlet |
getGridlet()
Gets this Gridlet object |
Gridlet |
GetGridlet()
Deprecated. As of GridSim 2.1, replaced by getGridlet() |
double |
getGridletArrivalTime()
Gets arrival time of a gridlet |
double |
getGridletFinishTime()
Gets the Gridlet's finish time |
int |
getGridletID()
Gets this Gridlet entity Id |
double |
getGridletLength()
Gets the Gridlet's length |
int |
getGridletStatus()
Gets the Gridlet status |
int[] |
getListPEID()
Gets a list of PE IDs |
int |
getMachineID()
Gets machine ID |
int |
GetMachineID()
Deprecated. As of GridSim 2.1, replaced by getMachineID() |
int |
getNumPE()
Gets the number of PEs required to execute this Gridlet. |
int |
getPEID()
Gets PE ID |
int |
GetPEID()
Deprecated. As of GridSim 2.1, replaced by getPEID() |
double |
getRemainingGridletLength()
Gets the remaining gridlet length |
double |
GetRemainingLength()
Deprecated. As of GridSim 2.1, replaced by getRemainingGridletLength() |
int |
getReservationID()
Gets the reservation ID that owns this Gridlet |
long |
getStartTime()
Gets the Gridlet or reservation start time. |
int |
getUserID()
Gets the user or owner of this Gridlet |
boolean |
hasReserved()
Checks whether this Gridlet is submitted by reserving or not. |
void |
setExecParam(double wallClockTime,
double actualCPUTime)
Sets this Gridlet's execution parameters. |
void |
setFinishTime(double time)
Sets the finish time for this Gridlet. |
void |
setFinishTimeForSpaceSharedResource(double availableRating)
Deprecated. As of GridSim 2.2, replaced by setFinishTime(double) . This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet. |
void |
SetFinishTimeForSpaceSharedResource(double availableRating)
Deprecated. As of GridSim 2.2, replaced by setFinishTime(double) . This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet. |
void |
setFinishTimeForTimeSharedResource(double availableRating,
ResourceCalendar rCalendar)
Deprecated. As of GridSim 2.2, replaced by setFinishTime(double) . This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet. |
void |
SetFinishTimeForTimeSharedResource(double availableRating,
ResourceCalendar rCalendar)
Deprecated. As of GridSim 2.2, replaced by setFinishTime(double) . This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet. |
boolean |
setGridletStatus(int status)
Sets the Gridlet status. |
void |
SetIDs(int machineID,
int peID)
Deprecated. As of GridSim 2.1, replaced by setMachineAndPEID(int, int) |
void |
setMachineAndPEID(int machineID,
int peID)
Sets 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 |
public ResGridlet(Gridlet gridlet)
GridSim.clock()
.
gridlet
- a gridlet objectGridSim.clock()
public ResGridlet(Gridlet gridlet, long startTime, int duration, int reservID)
GridSim.clock()
.
gridlet
- a gridlet objectstartTime
- a reservation start time. Can also be interpreted
as starting time to execute this Gridlet.duration
- a reservation duration time. Can also be interpreted
as how long to execute this Gridlet.reservID
- a reservation ID that owns this GridletGridSim.clock()
Method Detail |
public long getStartTime()
public int getDurationTime()
public int getNumPE()
public int getReservationID()
public boolean hasReserved()
public int getGridletID()
public int getUserID()
public double getGridletLength()
public boolean setGridletStatus(int status)
status
- the Gridlet status
public double getExecStartTime()
public void setExecParam(double wallClockTime, double actualCPUTime)
wallClockTime
- the time of this Gridlet resides in
a GridResource (from arrival time until
departure time).actualCPUTime
- the total execution time of this Gridlet in a
GridResource.public void SetIDs(int machineID, int peID)
setMachineAndPEID(int, int)
machineID
- machine IDpeID
- PE IDpublic void setMachineAndPEID(int machineID, int peID)
machineID
- machine IDpeID
- PE IDpublic int GetMachineID()
getMachineID()
public int getMachineID()
public int GetPEID()
getPEID()
public int getPEID()
public int[] getListPEID()
public double GetRemainingLength()
getRemainingGridletLength()
public double getRemainingGridletLength()
public void finalizeGridlet()
public void UpdateGridletFinishedSoFar(double miLength)
updateGridletFinishedSoFar(double)
miLength
- gridlet length in Million Instructions (MI)public void updateGridletFinishedSoFar(double miLength)
miLength
- gridlet length in Million Instructions (MI)public double GetArrivalTime()
getGridletArrivalTime()
public double getGridletArrivalTime()
public void SetFinishTimeForTimeSharedResource(double availableRating, ResourceCalendar rCalendar) throws NullPointerException
setFinishTime(double)
. This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet.
availableRating
- the available MIPS considering current hour
loadrCalendar
- Resourcce Calendar
NullPointerException
- if ResourceCalendar object is nullpublic void setFinishTimeForTimeSharedResource(double availableRating, ResourceCalendar rCalendar) throws NullPointerException
setFinishTime(double)
. This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet.
availableRating
- the available MIPS considering current hour
loadrCalendar
- Resourcce Calendar
NullPointerException
- if ResourceCalendar object is nullpublic void SetFinishTimeForSpaceSharedResource(double availableRating)
setFinishTime(double)
. This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet.
availableRating
- this is 100% availability of PE MIPS since
it runs in dedicated modepublic void setFinishTimeForSpaceSharedResource(double availableRating)
setFinishTime(double)
. This method is
OBSOLETE since it is the responsibility of individual
scheduling to come up with the finish time for each Gridlet.
availableRating
- this is 100% availability of PE MIPS since
it runs in dedicated modepublic void setFinishTime(double time)
time
- finish timepublic double GetFinishTime()
getGridletFinishTime()
public double getGridletFinishTime()
public Gridlet GetGridlet()
getGridlet()
public Gridlet getGridlet()
public int getGridletStatus()
|
GridSim v3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |