|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Date | +--atropos.lp.AvnmpTime | +--atropos.lp.AvnmpDebug | +--atropos.gvt.Gvt
This class implements the GVT update algorithm.
input -> storeIn() ... ouput -> storeOut() ... if isUpdateTime() startGvt() -> broadcast GvtUpdateRequest GvtUpdateRequest -> reportIn() -> [to all input processes to this process] GvtReportInput GvtReportInput -> reportLocalMinimum() -> [to GVT initiator] GvtUpdateResponse while !isDone() GvtUpdateResponse -> collectMinima()This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.
Field Summary | |
static int |
COLLECTMIN
The Gvt process is finishing the Gvt calculation. |
static byte |
GvtReportInput
Indicate a GVT report message type. |
static byte |
GvtUpdateRequest
Indicate a GVT update message type. |
static byte |
GvtUpdateResponse
Indicate a GVT response message type. |
static int |
IDLE
The Gvt process is not currently in operation. |
protected long |
lm
The local minimum. |
static int |
REPORTLOCAL
The Gvt process is reporting it's local minimum. |
static int |
START
The Gvt process is starting to broadcast Gvt update requests. |
Fields inherited from class atropos.lp.AvnmpDebug |
dlevel, DRIVER_D, GVT_D, html, LP_D, LPSTATE_D, MEASURE_D, NodeName, PACKET_D, PAYLOAD_D, PP_D, PREDM_D, RECQ_D, ROLLBACK_D, SNDQ_D, STATEQ_D, SYSTEM_D, TIME_D, TOLERANCE_D |
Fields inherited from interface atropos.lp.ConfigInterface |
Dvm, initTolerance, logdir, lvm, ootLimit, pdir, rmlog, rmplots, rmsnmp, runMinutes, snmpdir, VirtualMessageRatio |
Constructor Summary | |
Gvt()
Create a Gvt update process object. |
Method Summary | |
void |
addProcs(AvnmpLP lp,
java.util.Vector proc_queue,
long gvtupdate)
Prepare the GVT object for a calculation. |
protected long |
calcLocalMinimum()
Caculate the local minimum. |
long |
collectMinima(AvnmpPacket ap)
Collect all the local minima from all processes and compute a global minimum. |
abstract long |
getlvt()
This method is expected to be over-ridden by the logical process. |
int |
getNumProcs()
Return the number of processes expected to report back with their local minimum. |
long |
getNumUpdates()
Returns the number of GVT update requests since the object was created. |
int |
getProcReport()
Return the current value of the number of processes which have reported their current local minimum. |
java.lang.String |
getState()
Return the state of the Gvt process. |
long |
getTimeSinceLastUpdate()
Returns relative time since the Gvt was last updated. |
long |
getUpdateInterval()
Returns the GVT update interval. |
boolean |
isDone()
Is the GVT computation complete ? |
boolean |
isUpdateTime()
Return true if time for a new GVT update. |
abstract java.lang.String |
myname()
This method is expected to be over-ridden by the logical process. |
AvnmpQueue |
reportIn(AvnmpPacket p)
Send GVT minima information to all processes which sent input messages to this process. |
AvnmpQueue |
reportLocalMinimum()
Report the local minimum back to the Gvt Initiator. |
void |
resetGvt()
Prepare the GVT for a new calculation. |
AvnmpQueue |
startGvt()
Initiate the GVT calculation process. |
void |
storeIn(AvnmpPacket ap)
Record GVT status information upon the receipt of ANY input message. |
void |
storeOut(AvnmpPacket ap)
Store GVT status information for every message sent from this process. |
java.lang.String |
toString()
Display this GVT status object as a string. |
Methods inherited from class atropos.lp.AvnmpDebug |
debugType, getRealTime, log, log, log, log, measure, resetLog, setLevel, writeLog |
Methods inherited from class atropos.lp.AvnmpTime |
add, adjustRelative, diff, now, resetRelative, set, startTime, time |
Methods inherited from class java.util.Date |
after, before, clone, compareTo, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, UTC |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte GvtUpdateRequest
public static final byte GvtUpdateResponse
public static final byte GvtReportInput
public static final int IDLE
public static final int START
public static final int REPORTLOCAL
public static final int COLLECTMIN
protected long lm
Constructor Detail |
public Gvt()
Method Detail |
public void addProcs(AvnmpLP lp, java.util.Vector proc_queue, long gvtupdate)
lp
- This logical process.proc_queue
- The names of all the other logical processes.gvtupdate
- The GVT update interval.public void resetGvt()
public AvnmpQueue startGvt()
public void storeIn(AvnmpPacket ap)
ap
- Incomming message.public AvnmpQueue reportIn(AvnmpPacket p)
p
- The incomming packet from a GVT Initiator.public void storeOut(AvnmpPacket ap)
ap
- The message sent.protected long calcLocalMinimum()
public AvnmpQueue reportLocalMinimum()
public long collectMinima(AvnmpPacket ap)
ap
- A GvtUpdateResponse message.public boolean isDone()
public int getProcReport()
public int getNumProcs()
public java.lang.String toString()
toString
in class AvnmpTime
public java.lang.String getState()
IDLE
,
START
,
REPORTLOCAL
,
COLLECTMIN
public long getNumUpdates()
public long getUpdateInterval()
public long getTimeSinceLastUpdate()
public boolean isUpdateTime()
public abstract long getlvt()
getlvt
in class AvnmpDebug
public abstract java.lang.String myname()
myname
in class AvnmpDebug
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |