GridSim
v3.0

gridsim
Class Machine

Object
  extended bygridsim.Machine

public class Machine
extends Object

GridSim Machine class represents an uniprocessor or shared memory multiprocessor machine. It can contain one or more Processing Elements (PEs).

Since:
GridSim Toolkit 1.0
Version:
3.0, May 2004
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Constructor Summary
Machine(int id, PEList list)
          Allocates a new Machine object
 
Method Summary
 int ByteSize()
          Deprecated. As of GridSim 2.1, replaced by getByteSize()
 int getByteSize()
          Gets the byte size of this class
 int GetID()
          Deprecated. As of GridSim 2.1, replaced by getMachineID()
 int getMachineID()
          Gets the machine ID
 int getMIPSRating()
          Gets the Millions Instruction Per Second (MIPS) Rating.
 int GetMIPSRating()
          Deprecated. As of GridSim 2.1, replaced by getMIPSRating()
 int getNumBusyPE()
          Gets the number of BUSY PE for this Machine
 int getNumFreePE()
          Gets the number of FREE or non-busy PE for this Machine
 int getNumPE()
          Gets the number of PE for this Machine
 PEList getPEList()
          Gets the linked-list of all PEs
 PEList GetPEs()
          Deprecated. As of GridSim 2.1, replaced by getPEList()
 int getSize()
          Gets the number of PEs
 int GetSize()
          Deprecated. As of GridSim 2.1, replaced by getSize()
 boolean setStatusPE(boolean status, int peID)
          Sets the particular PE status on this Machine
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Machine

public Machine(int id,
               PEList list)
Allocates a new Machine object

Parameters:
id - the machine ID
list - list of PEs
Pre Condition:
id > 0, list != null
Post Condition:
$none
Method Detail

GetID

public int GetID()
Deprecated. As of GridSim 2.1, replaced by getMachineID()

Gets the machine ID

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

getMachineID

public int getMachineID()
Gets the machine ID

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

GetSize

public int GetSize()
Deprecated. As of GridSim 2.1, replaced by getSize()

Gets the number of PEs

Returns:
the number of PEs
Pre Condition:
$none
Post Condition:
$result >= 0

getSize

public int getSize()
Gets the number of PEs

Returns:
the number of PEs
Pre Condition:
$none
Post Condition:
$result >= 0

GetPEs

public PEList GetPEs()
Deprecated. As of GridSim 2.1, replaced by getPEList()

Gets the linked-list of all PEs

Returns:
the linked-list of all PEs
See Also:
PEList
Pre Condition:
$none
Post Condition:
$result != null

getPEList

public PEList getPEList()
Gets the linked-list of all PEs

Returns:
the linked-list of all PEs
See Also:
PEList
Pre Condition:
$none
Post Condition:
$result != null

GetMIPSRating

public int GetMIPSRating()
Deprecated. As of GridSim 2.1, replaced by getMIPSRating()

Gets the Millions Instruction Per Second (MIPS) Rating. However, for Shared Memory Multiprocessors (SMPs), it is is generally assumed that all PEs have the same rating.

Returns:
the sum of MIPS rating of all PEs in a machine.
Pre Condition:
$none
Post Condition:
$result >= 0

getMIPSRating

public int getMIPSRating()
Gets the Millions Instruction Per Second (MIPS) Rating. However, for Shared Memory Multiprocessors (SMPs), it is is generally assumed that all PEs have the same rating.

Returns:
the sum of MIPS rating of all PEs in a machine.
Pre Condition:
$none
Post Condition:
$result >= 0

setStatusPE

public boolean setStatusPE(boolean status,
                           int peID)
Sets the particular PE status on this Machine

Parameters:
status - PE status, either PE.FREE or PE.BUSY
peID - PE id
Returns:
true if the PE status has changed, false otherwise (PE id might not be exist)
Pre Condition:
peID >= 0
Post Condition:
$none

getNumPE

public int getNumPE()
Gets the number of PE for this Machine

Returns:
number of PE
Pre Condition:
$none
Post Condition:
$result >= 0

getNumFreePE

public int getNumFreePE()
Gets the number of FREE or non-busy PE for this Machine

Returns:
number of PE
Pre Condition:
$none
Post Condition:
$result >= 0

getNumBusyPE

public int getNumBusyPE()
Gets the number of BUSY PE for this Machine

Returns:
number of PE
Pre Condition:
$none
Post Condition:
$result >= 0

ByteSize

public int ByteSize()
Deprecated. As of GridSim 2.1, replaced by getByteSize()

Gets the byte size of this class

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

getByteSize

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

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

GridSim
v3.0

The University of Melbourne, Australia, 2004