|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPE
public class PE
This class represents the physical processors involved in the time warp simulation engine.
Field Summary | |
---|---|
(package private) java.util.concurrent.PriorityBlockingQueue<Message> |
cancelQ
The queue that holds messages that have been cancelled. |
(package private) Flag |
eosFlag
Flag for end of sim |
(package private) java.util.concurrent.PriorityBlockingQueue<Message> |
eventQ
The queue that holds the processed and unprocessed events for LPs mapped to this PE. |
(package private) java.util.concurrent.PriorityBlockingQueue<Message> |
freeQ
The queue that holds the events whose memeory is free to reclaim. |
(package private) GlobalNameServer |
gns
The GlobalNameServer |
(package private) int |
GVT
The most recent GVT |
(package private) int |
id
The id of this PE. |
(package private) LocalNameServer |
localNameServer
The LocalNameServer in charge of routing messages. |
(package private) MessagePool |
msgPool
The message pool where all messages are stored |
(package private) SchedulingLoop |
schedulingLoop
The scheduler that schedules events for this PE. |
(package private) java.util.concurrent.PriorityBlockingQueue<Message> |
sendQ
The queue that holds the outgoing messages. |
(package private) int |
sleepTime
Sleep time |
Constructor Summary | |
---|---|
PE(int peid,
MessagePool msgp,
Flag ef,
Flag gf,
int gc)
Constructs a new PE instance. |
Method Summary | |
---|---|
void |
addLP(LogicalProcess lp)
Adds a LP into LPs. |
void |
createLPs(int pid,
int lid,
java.lang.String appid,
java.lang.String appName,
java.lang.String className,
java.lang.String dat)
Create LPs in the specified subclass. |
void |
dumpLNS()
Display the contents of the routing table. |
void |
finalizeLPs()
Finalizes LPs by invoking finalizeLP method provided by subclasses of LogicalProcess. |
(package private) void |
finalizePE()
|
int |
getID()
Returns the id of the PE. |
LogicalProcess |
getLPByID(int lpid)
Gets the LP by its id. |
java.util.Vector |
getRoutingTable()
Returns the routing table. |
void |
initLPs()
Initialize LPs by invoking initializeLP method provided by subclasses of LogicalProcess. |
void |
processCanQ()
Places AntiMessages in CanQ. |
(package private) void |
processEvents()
Processes events. |
(package private) void |
processQs()
Processes the queues. |
void |
receiveMsg()
Receives messages sent to this PE. |
void |
run()
Runs the PE(processing events). |
void |
sendMessages()
Checks the sendQ and sends message if any. |
void |
setGNS(GlobalNameServer g)
Sets the global name server for this PE. |
void |
setID(int theID)
Sets the id for the PE (dummy method). |
void |
setLNS(LocalNameServer lns)
Sets the local name server for this PE. |
void |
setSleepTime(int st)
set the sleep time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int id
Flag eosFlag
int GVT
int sleepTime
MessagePool msgPool
LocalNameServer localNameServer
GlobalNameServer gns
java.util.concurrent.PriorityBlockingQueue<Message> cancelQ
java.util.concurrent.PriorityBlockingQueue<Message> sendQ
java.util.concurrent.PriorityBlockingQueue<Message> eventQ
java.util.concurrent.PriorityBlockingQueue<Message> freeQ
SchedulingLoop schedulingLoop
Constructor Detail |
---|
public PE(int peid, MessagePool msgp, Flag ef, Flag gf, int gc)
peid
- int the id of the PE, i.e. the id of this process in MPI.comm.Method Detail |
---|
public void setSleepTime(int st)
public void run()
run
in interface java.lang.Runnable
void finalizePE()
public void receiveMsg()
public void sendMessages()
void processQs()
void processEvents()
public void processCanQ()
public void createLPs(int pid, int lid, java.lang.String appid, java.lang.String appName, java.lang.String className, java.lang.String dat)
pid
- int the id of the PE where the LP resides.lid
- int the LP id assigned by the system.appid
- String the application-assigned id of the instance.appName
- String the application-assigned name of the instance.className
- String the name of the instance.dat
- String the configuration data provided by application.public LogicalProcess getLPByID(int lpid)
lpid
- int the LP id.public void setGNS(GlobalNameServer g)
public void setLNS(LocalNameServer lns)
public void dumpLNS()
public void initLPs()
public void finalizeLPs()
public java.util.Vector getRoutingTable()
public void addLP(LogicalProcess lp)
public int getID()
public void setID(int theID)
theID
- int representing the value that the PE's id will be set to.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |