|
GridSim v3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectgridsim.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 |
ByteSize()
Deprecated. As of GridSim 2.1, replaced by getByteSize() |
double |
CPU_time(double gridletLength,
double load)
Deprecated. As of GridSim 2.1, replaced by getCPUTime(double, double) |
int |
GetAllocationPolicy()
Deprecated. As of GridSim 2.1, replaced by getResourceAllocationPolicy() |
String |
GetArch()
Deprecated. As of GridSim 2.1, replaced by getResourceArch() |
int |
getByteSize()
Gets the byte size of this class |
double |
getCostPerMI()
Gets the cost per Millions Instruction (MI) associated with a resource |
double |
GetCostPerMI()
Deprecated. As of GridSim 2.1, replaced by getCostPerMI() |
double |
getCostPerSec()
Gets the cost per second associated with a resource |
double |
GetCostPerSec()
Deprecated. As of GridSim 2.1, replaced by getCostPerSec() |
double |
getCPUTime(double gridletLength,
double load)
Gets the CPU time given the specified parameters (only for TIME_SHARED). |
int |
GetID()
Deprecated. As of GridSim 2.1, replaced by getResourceID() |
MachineList |
getMachineList()
Gets the list of machines in a resouce |
MachineList |
GetMachines()
Deprecated. As of GridSim 2.1, replaced by getMachineList() |
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 |
GetMIPSRating()
Deprecated. As of GridSim 2.1, replaced by getMIPSRating() |
int |
getMIPSRatingOfOnePE()
Gets Millions Instructions Per Second (MIPS) Rating of a Processing Element (PE). |
int |
GetMIPSRatingOfOnePE()
Deprecated. As of GridSim 2.1, replaced by getMIPSRatingOfOnePE() |
int |
getMIPSRatingOfOnePE(int id,
int peID)
Gets Millions Instructions Per Second (MIPS) Rating of a Processing Element (PE). |
int |
GetMIPSRatingOfOnePE(int id,
int peID)
Deprecated. As of GridSim 2.1, replaced by getMIPSRatingOfOnePE(int, int) |
String |
GetName()
Deprecated. As of GridSim 2.1, replaced by getResourceName() |
int |
GetNoOfPEs()
Deprecated. As of GridSim 2.1, replaced by getNumPE() |
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 |
String |
GetOS()
Deprecated. As of GridSim 2.1, replaced by getResourceOS() |
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 |
double |
GetTimeZone()
Deprecated. As of GridSim 2.1, replaced by getResourceTimeZone() |
void |
setCostPerSec(double costPerSec)
Sets the cost per second associated with a resource |
void |
SetCostPerSec(double costPerSec)
Deprecated. As of GridSim 2.1, replaced by setCostPerSec(double) |
void |
SetID(int id)
Deprecated. As of GridSim 2.1, replaced by setResourceID(int) |
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 SetID(int id)
setResourceID(int)
id
- the resource IDpublic void setResourceID(int id)
id
- the resource IDpublic int GetID()
getResourceID()
public int getResourceID()
public String GetName()
getResourceName()
public String getResourceName()
public String GetArch()
getResourceArch()
public String getResourceArch()
public String GetOS()
getResourceOS()
public String getResourceOS()
public MachineList GetMachines()
getMachineList()
MachineList
public MachineList getMachineList()
MachineList
public Machine getMachineWithFreePE()
public Machine getMachineWithFreePE(int numPE)
numPE
- number of PE
public int GetAllocationPolicy()
getResourceAllocationPolicy()
public int getResourceAllocationPolicy()
public double GetTimeZone()
getResourceTimeZone()
public double getResourceTimeZone()
public int GetMIPSRatingOfOnePE()
getMIPSRatingOfOnePE()
public int getMIPSRatingOfOnePE()
public int GetMIPSRatingOfOnePE(int id, int peID)
getMIPSRatingOfOnePE(int, int)
id
- the machine IDpeID
- the PE ID
public int getMIPSRatingOfOnePE(int id, int peID)
id
- the machine IDpeID
- the PE ID
public int GetMIPSRating()
getMIPSRating()
public int getMIPSRating()
Total MIPS rating for:
public double CPU_time(double gridletLength, double load)
getCPUTime(double, double)
gridletLength
- the length of a Gridletload
- the load of a Gridlet
public double getCPUTime(double gridletLength, double load)
gridletLength
- the length of a Gridletload
- the load of a Gridlet
public int GetNoOfPEs()
getNumPE()
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)
setCostPerSec(double)
costPerSec
- the cost using a resourcepublic void setCostPerSec(double costPerSec)
costPerSec
- the cost using a resourcepublic double GetCostPerSec()
getCostPerSec()
public double getCostPerSec()
public double GetCostPerMI()
getCostPerMI()
public double getCostPerMI()
public int ByteSize()
getByteSize()
public int getByteSize()
|
GridSim v3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |