GridSim
v3.3

gridsim
Class PEList

Object
  extended byAbstractCollection
      extended byAbstractList
          extended byAbstractSequentialList
              extended byLinkedList
                  extended bygridsim.PEList
All Implemented Interfaces:
Cloneable, Collection, List, Serializable

public class PEList
extends LinkedList

GridSim PEList maintains a list of PEs (Processing Elements) that make up a machine.

Since:
GridSim Toolkit 1.0
Author:
Manzur Murshed and Rajkumar Buyya
See Also:
Serialized Form
Invariant:
$none

Field Summary
 
Fields inherited from class AbstractList
modCount
 
Constructor Summary
PEList()
          Allocates a new PEList object
 
Method Summary
 int ByteSize()
          Deprecated. As of GridSim 2.1, replaced by getByteSize()
 int getByteSize()
          Gets the byte size of PEList internal data members
 int getFreePEID()
          Gets a PE ID which is FREE
 int GetFreePEID()
          Deprecated. As of GridSim 2.1, replaced by getFreePEID()
 int getMIPSRating(int id)
          Gets MIPS Rating for a specified PE ID
 int GetMIPSRating(int id)
          Deprecated. As of GridSim 2.1, replaced by getMIPSRating(int)
 int getNumBusyPE()
          Gets the number of BUSY PE
 int getNumFreePE()
          Gets the number of FREE or non-busy PE.
 boolean setStatusPE(boolean status, int peID)
          Sets the PE status
 
Methods inherited from class LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class AbstractSequentialList
iterator
 
Methods inherited from class AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

PEList

public PEList()
Allocates a new PEList object

Pre Condition:
$none
Post Condition:
$none
Method Detail

GetMIPSRating

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

Gets MIPS Rating for a specified PE ID

Parameters:
id - the PE ID
Returns:
the MIPS rating if exists, otherwise returns -1
Pre Condition:
id >= 0
Post Condition:
$none

getMIPSRating

public int getMIPSRating(int id)
Gets MIPS Rating for a specified PE ID

Parameters:
id - the PE ID
Returns:
the MIPS rating if exists, otherwise returns -1
Pre Condition:
id >= 0
Post Condition:
$none

GetFreePEID

public int GetFreePEID()
Deprecated. As of GridSim 2.1, replaced by getFreePEID()

Gets a PE ID which is FREE

Returns:
a PE ID if it is FREE, otherwise returns -1
Pre Condition:
$none
Post Condition:
$none

getFreePEID

public int getFreePEID()
Gets a PE ID which is FREE

Returns:
a PE ID if it is FREE, otherwise returns -1
Pre Condition:
$none
Post Condition:
$none

getNumFreePE

public int getNumFreePE()
Gets the number of FREE or non-busy PE.

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

setStatusPE

public boolean setStatusPE(boolean status,
                           int peID)
Sets the PE status

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

getNumBusyPE

public int getNumBusyPE()
Gets the number of BUSY PE

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 PEList internal data members

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

getByteSize

public int getByteSize()
Gets the byte size of PEList internal data members

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

GridSim
v3.3

The University of Melbourne, Australia, 2005