GridSim 5.0 beta

gridsim
Class PE

Object
  extended by PE

public class PE
extends Object

GridSim PE (Processing Element) class represents CPU unit, defined in terms of Millions Instructions Per Second (MIPS) rating.
ASSUMPTION: All PEs under the same Machine have the same MIPS rating.

Since:
GridSim Toolkit 1.0
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Field Summary
static boolean BUSY
          Denotes PE is allocated and hence busy in processing Gridlet
static boolean FAILED
          Denotes PE is failed and hence it can't process any Gridlet at this moment.
static boolean FREE
          Denotes PE is FREE for allocation
 
Constructor Summary
PE(int id, int MIPSRating)
          Allocates a new PE object
 
Method Summary
static int getByteSize()
          Gets the byte size of this class
 int getID()
          Gets the PE ID
 int getMIPSRating()
          Gets the MIPS Rating of this PE
 boolean getStatus()
          Gets the status of this PE
 void setMIPSRating(int rating)
          Sets the MIPS Rating of this PE
 void setStatus(boolean status)
          Sets PE status to either PE.FREE or PE.BUSY
 void setStatusBusy()
          Sets PE status to busy, meaning it is already executing Gridlets.
 void setStatusFailed()
          Sets this PE to FAILED.
 void setStatusFree()
          Sets PE status to free, meaning it is available for processing.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FREE

public static final boolean FREE
Denotes PE is FREE for allocation

See Also:
Constant Field Values

BUSY

public static final boolean BUSY
Denotes PE is allocated and hence busy in processing Gridlet

See Also:
Constant Field Values

FAILED

public static final boolean FAILED
Denotes PE is failed and hence it can't process any Gridlet at this moment. This PE is failed because it belongs to a machine which is also failed.

See Also:
Constant Field Values
Constructor Detail

PE

public PE(int id,
          int MIPSRating)
Allocates a new PE object

Parameters:
id - the PE ID
MIPSRating - the capability of the PE. All PEs under the same Machine have same MIPS rating.
Pre Condition:
id >= 0, MIPSRating >= 0
Post Condition:
$none
Method Detail

getID

public int getID()
Gets the PE ID

Returns:
the PE ID
Pre Condition:
$none
Post Condition:
$result >= 0

setMIPSRating

public void setMIPSRating(int rating)
Sets the MIPS Rating of this PE

Parameters:
rating - the capability of the PE
Pre Condition:
rating >= 0
Post Condition:
$none

getMIPSRating

public int getMIPSRating()
Gets the MIPS Rating of this PE

Returns:
the MIPS Rating
Pre Condition:
$none
Post Condition:
$result >= 0

getStatus

public boolean getStatus()
Gets the status of this PE

Returns:
the status of this PE
Pre Condition:
$none
Post Condition:
$none

setStatusFree

public void setStatusFree()
Sets PE status to free, meaning it is available for processing. This should be used by SPACE shared resources only.

Pre Condition:
$none
Post Condition:
$none

setStatusBusy

public void setStatusBusy()
Sets PE status to busy, meaning it is already executing Gridlets. This should be used by SPACE shared resources only.

Pre Condition:
$none
Post Condition:
$none

setStatus

public void setStatus(boolean status)
Sets PE status to either PE.FREE or PE.BUSY

Parameters:
status - PE status, true if it is FREE, false if BUSY.
Pre Condition:
$none
Post Condition:
$none

getByteSize

public static int getByteSize()
Gets the byte size of this class

Returns:
the byte size
Pre Condition:
$none
Post Condition:
$result > 0

setStatusFailed

public void setStatusFailed()
Sets this PE to FAILED.

Pre Condition:
$none
Post Condition:
$none

GridSim 5.0 beta

The University of Melbourne, Australia, 2009