|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object ResourceCharacteristics
public class ResourceCharacteristics
GridSim ResourceCharacteristics class represents static properties of a resource such as resource architecture, Operating System (OS), management policy (time- or space-shared), cost and time zone at which the resource is located along resource configuration.
Field Summary | |
---|---|
static int |
ADVANCE_RESERVATION
A resource that supports Advanced Reservation mechanisms. |
static int |
OTHER_POLICY_DIFFERENT_RATING
Assuming all PEs in a Machine have the same rating. |
static int |
OTHER_POLICY_SAME_RATING
Assuming all PEs in all Machines have the same rating. |
static int |
SPACE_SHARED
Spaced-shared system using First Come First Serve (FCFS) algorithm |
static int |
TIME_SHARED
Time-shared system using Round-Robin algorithm |
Constructor Summary | |
---|---|
ResourceCharacteristics(String architecture,
String OS,
MachineList machineList,
int allocationPolicy,
double timeZone,
double costPerSec)
Allocates a new ResourceCharacteristics object. |
Method Summary | |
---|---|
int |
getByteSize()
Gets the byte size of this class |
double |
getCostPerMI()
Gets the cost per Millions Instruction (MI) associated with a resource |
double |
getCostPerSec()
Gets the cost per second associated with a resource |
double |
getCPUTime(double gridletLength,
double load)
Gets the CPU time given the specified parameters (only for TIME_SHARED). |
MachineList |
getMachineList()
Gets the list of machines in a resouce |
Machine |
getMachineWithFreePE()
Gets a Machine with at least one empty PE |
Machine |
getMachineWithFreePE(int numPE)
Gets a Machine with at least a given number of free PE |
int |
getMIPSRating()
Gets the total MIPS rating, which is the sum of MIPS rating of all machines in a resource. |
int |
getMIPSRatingOfOnePE()
Gets Millions Instructions Per Second (MIPS) Rating of a Processing Element (PE). |
int |
getMIPSRatingOfOnePE(int id,
int peID)
Gets Millions Instructions Per Second (MIPS) Rating of a Processing Element (PE). |
int |
getNumBusyPE()
Gets the total number of BUSY PEs for all Machines |
int |
getNumFailedMachines()
Gets the current number of failed machines. |
int |
getNumFreePE()
Gets the total number of FREE or non-busy PEs for all Machines |
int |
getNumMachines()
Gets the total number of machines. |
int |
getNumPE()
Gets the total number of PEs for all Machines |
int |
getResourceAllocationPolicy()
Gets the resource allocation policy |
String |
getResourceArch()
Gets the resource architecture name |
int |
getResourceID()
Gets the resource ID |
String |
getResourceName()
Gets the name of a resource |
String |
getResourceOS()
Gets the Operating System (OS) this resource is used |
double |
getResourceTimeZone()
Gets the resource time zone |
boolean |
isWorking()
Checks whether all machines of this resource are working properly or not. |
void |
setCostPerSec(double costPerSec)
Sets the cost per second associated with a resource |
void |
setResourceID(int id)
Sets the resource ID |
boolean |
setStatusPE(boolean status,
int machineID,
int peID)
Sets the particular PE status on a Machine |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TIME_SHARED
public static final int SPACE_SHARED
public static final int OTHER_POLICY_SAME_RATING
public static final int OTHER_POLICY_DIFFERENT_RATING
public static final int ADVANCE_RESERVATION
Constructor Detail |
---|
public ResourceCharacteristics(String architecture, String OS, MachineList machineList, int allocationPolicy, double timeZone, double costPerSec)
architecture
- the architecture of a resourceOS
- the operating system usedmachineList
- list of machines in a resourceallocationPolicy
- the resource allocation policytimeZone
- local time zone of a user that owns this reservation.
Time zone should be of range [GMT-12 ... GMT+13]costPerSec
- the cost per sec to use this resourceMethod Detail |
---|
public void setResourceID(int id)
id
- the resource IDpublic int getResourceID()
public String getResourceName()
public String getResourceArch()
public String getResourceOS()
public MachineList getMachineList()
MachineList
public Machine getMachineWithFreePE()
public Machine getMachineWithFreePE(int numPE)
numPE
- number of PE
public int getResourceAllocationPolicy()
public double getResourceTimeZone()
public int getMIPSRatingOfOnePE()
public int getMIPSRatingOfOnePE(int id, int peID)
id
- the machine IDpeID
- the PE ID
public int getMIPSRating()
Total MIPS rating for:
public double getCPUTime(double gridletLength, double load)
gridletLength
- the length of a Gridletload
- the load of a Gridlet
public int getNumPE()
public int getNumFreePE()
public int getNumBusyPE()
public boolean setStatusPE(boolean status, int machineID, int peID)
status
- PE status, either PE.FREE or PE.BUSYmachineID
- Machine IDpeID
- PE id
public void setCostPerSec(double costPerSec)
costPerSec
- the cost using a resourcepublic double getCostPerSec()
public double getCostPerMI()
public int getByteSize()
public int getNumMachines()
public int getNumFailedMachines()
public boolean isWorking()
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |