|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object ResourceCharacteristics ResourceDynamics
public class ResourceDynamics
GridSim ResourceDynamics
class represents static
properties of a resource such as resource architecture, Operating
System (OS), management policy (time-shared, space-shared,
parallel-space-shared and parallel-space-shared with advance reservations),
cost and time zone at which the resource is located along resource
configuration.
NOTE: This class has been created to maintain the compatibility
with the GridSim model in which the ResourceCharacteristics
implements methods that return the number of PEs available,
among other information.
Field Summary |
---|
Fields inherited from class ResourceCharacteristics |
---|
ADVANCE_RESERVATION, OTHER_POLICY_DIFFERENT_RATING, OTHER_POLICY_SAME_RATING, SPACE_SHARED, TIME_SHARED |
Constructor Summary | |
---|---|
ResourceDynamics(ResourceCharacteristics ch)
Allocates a new ResourceDynamics object. |
|
ResourceDynamics(String architecture,
String os,
MachineList machineList,
int allocationPolicy,
double timeZone,
double costPerSec)
Allocates a new ResourceDynamics object. |
Method Summary | |
---|---|
PERangeList |
getFreePERanges()
Returns the list of ranges of PEs available at the current simulation time |
LinkedList<Machine> |
getListMachineWithFreePE()
Returns a list of machines with free PEs. NOTE: Not supported. |
Machine |
getMachineWithFreePE()
Gets a Machine with at least one empty PE NOTE: Not supported. |
Machine |
getMachineWithFreePE(int numPE)
Gets a Machine with at least a given number of free PE NOTE: Not supported. |
int |
getMIPSRating()
Gets the total MIPS rating, which is the sum of MIPS rating of all machines in a resource. |
int |
getNumBusyPE()
Gets the total number of BUSY PEs for all Machines |
int |
getNumFreePE()
Gets the total number of FREE or non-busy PEs for all Machines |
int |
getNumPE()
Gets the total number of PEs for all Machines |
void |
resetFreePERanges()
This method resets the ranges of PEs available. |
void |
resetFreePERanges(PERangeList ranges)
Resets the ranges of PEs available and sets it to the list provided |
void |
setPEsAvailable(PERangeList ranges)
Sets the status of a list of ranges of PEs to available |
void |
setPEsBusy(PERangeList ranges)
Sets the status of a list of ranges of PEs to busy |
boolean |
setStatusPE(boolean status,
int machineID,
int peID)
Sets the particular PE status on a Machine NOTE: Not supported. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceDynamics(String architecture, String os, MachineList machineList, int allocationPolicy, double timeZone, double costPerSec)
ResourceDynamics
object.
If the time zone is invalid, then by default, it will be GMT+0.
architecture
- the architecture of a resourceos
- the operating system usedmachineList
- list of machines in a resourceallocationPolicy
- the resource allocation policytimeZone
- local time zone where the resource is.
Time zone should be of range [GMT-12 ... GMT+13]costPerSec
- the cost per sec to use this resourcepublic ResourceDynamics(ResourceCharacteristics ch)
ResourceDynamics
object.
ch
- the original resource characteristics object.Method Detail |
---|
public void resetFreePERanges()
public Machine getMachineWithFreePE()
getMachineWithFreePE
in class ResourceCharacteristics
null
if not foundpublic LinkedList<Machine> getListMachineWithFreePE()
public Machine getMachineWithFreePE(int numPE)
getMachineWithFreePE
in class ResourceCharacteristics
numPE
- number of PE
null
if not foundpublic int getMIPSRating()
getMIPSRating
in class ResourceCharacteristics
public int getNumPE()
getNumPE
in class ResourceCharacteristics
public int getNumFreePE()
FREE
or non-busy PEs for all Machines
getNumFreePE
in class ResourceCharacteristics
public int getNumBusyPE()
BUSY
PEs for all Machines
getNumBusyPE
in class ResourceCharacteristics
public void setPEsBusy(PERangeList ranges)
ranges
- the list of ranges of PEs whose status has to be changedpublic void setPEsAvailable(PERangeList ranges)
ranges
- the list of ranges of PEs whose status has to be changedpublic void resetFreePERanges(PERangeList ranges)
ranges
- the list of ranges availablepublic PERangeList getFreePERanges()
public boolean setStatusPE(boolean status, int machineID, int peID)
setStatusPE
in class ResourceCharacteristics
status
- PE status, either PE.FREE
or PE.BUSY
machineID
- Machine IDpeID
- PE id
true
if the PE status has changed, false
otherwise (Machine id or PE id might not be exist)
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |