Class Processor

java.lang.Object
   |
   +----Processor

public class Processor
extends Object
Represents a processor in the Network

See Also:
Network

Variable Index

 o id
 o NO_PROCESSOR

Constructor Index

 o Processor(int, Network, int, int, int, TheSimulator)
Create a new processor with the specified characteristics
 o Processor(int, Network, int, int, int, TheSimulator, float, float, float)
Create a new processor with the specified characteristics for a LogP network

Method Index

 o addNeighbour(Processor, int)
Add a new neighbour to this processor
 o addOneWayNeighbour(Processor, int)
 o getNeighbours()
 o getPeId()
 o handleEvent(ProcessorEvent)
Takes care of events arriving from the Network
 o IOCompletionTime(float)
Models contention in the disk associated with this processor by serializing consecutive requests
 o isIdle()
 o isNeighbour(Processor)
 o toString()

Variables

 o NO_PROCESSOR
 public static final int NO_PROCESSOR
 o id
 public int id

Constructors

 o Processor
 public Processor(int i,
                  Network n,
                  int s,
                  int bs,
                  int tsl,
                  TheSimulator sim)
Create a new processor with the specified characteristics

Parameters:
i - The processor id
n - The newtwork to which the processor belongs
bs - The size of the processors communication buffer
s - The speed of this processor in some unit
 o Processor
 public Processor(int i,
                  Network n,
                  int s,
                  int bs,
                  int tsl,
                  TheSimulator sim,
                  float _L,
                  float _o,
                  float _g)
Create a new processor with the specified characteristics for a LogP network

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o getPeId
 public int getPeId()
 o getNeighbours
 public int[] getNeighbours()
 o IOCompletionTime
 public float IOCompletionTime(float dt)
Models contention in the disk associated with this processor by serializing consecutive requests

Parameters:
dt - - Duration of current request
See Also:
Task
 o handleEvent
 public void handleEvent(ProcessorEvent pe)
Takes care of events arriving from the Network

 o addNeighbour
 public void addNeighbour(Processor p,
                          int speed)
Add a new neighbour to this processor

Parameters:
p - the new neighbour
speed - the speed of the communication link between the two processors
 o addOneWayNeighbour
 public void addOneWayNeighbour(Processor p,
                                int speed)
 o isNeighbour
 public boolean isNeighbour(Processor p)
Returns:
Wheter processor p is a neighbour of this processor
 o isIdle
 public boolean isIdle()
Returns:
Wheter this processor is currently running a task