All Packages Class Hierarchy This Package Previous Next Index
Class magician.Node.SPExecEnv
java.lang.Object
|
+----magician.Node.Resource
|
+----magician.Node.SPExecEnv
- public class SPExecEnv
- extends Resource
- implements Runnable, PerfConstants
This class monitors the execution of a Smartpacket thread. t attempts
to keep account of memory used, cpu usage, and other statistics
- See Also:
- SPThread
-
AppPredictorTable
-
-
AppsRecorded
-
-
clockspeed
-
-
cpuinfo
-
-
CPUTime
- The length of execution time (in millisecond)
Should be less than MAX_CPU_TIME
-
evm
-
-
IOBandwidth
- The I/O bandwidth that this SP can utilize (in bps)
-
memUsage
- Estimated memory usage (in bytes)
Calculated as the number of objects allocated multiplied by
the size of each object
-
numObjects
- The number of objects allocated so far by this SPThread
-
rm
-
-
thread
- the Smartpacket thread being monitored
-
threadStarted
- test for thread control
-
thStartTime
-
-
totalMemory
- The maximum size of memory which can be allocated by
the SmartPacket running this thread (in bytes)
-
SPExecEnv(KUSmartPacketV2, ThreadGroup, ResourceMgr)
- initializes the execution environment prameters and create a new SPThread
-
()
-
-
getNumObjects()
- returns the number of objects allocated by the Smartpacket thread
-
notifyExecEnv()
- called by SmartPacket thread to notify exec env
-
recordStartTime(EventManager, String)
-
-
run()
- starts SmartPacket thread and monitors cpu
usage.
-
setFinalExecTime(long)
-
thread
protected SPThread thread
- the Smartpacket thread being monitored
numObjects
protected int numObjects
- The number of objects allocated so far by this SPThread
memUsage
protected long memUsage
- Estimated memory usage (in bytes)
Calculated as the number of objects allocated multiplied by
the size of each object
CPUTime
protected long CPUTime
- The length of execution time (in millisecond)
Should be less than MAX_CPU_TIME
totalMemory
protected int totalMemory
- The maximum size of memory which can be allocated by
the SmartPacket running this thread (in bytes)
IOBandwidth
protected int IOBandwidth
- The I/O bandwidth that this SP can utilize (in bps)
threadStarted
protected boolean threadStarted
- test for thread control
rm
protected ResourceMgr rm
thStartTime
protected long thStartTime
evm
protected EventManager evm
AppPredictorTable
protected static Hashtable AppPredictorTable
AppsRecorded
protected static Hashtable AppsRecorded
clockspeed
protected static long clockspeed
cpuinfo
protected static String cpuinfo
SPExecEnv
protected SPExecEnv(KUSmartPacketV2 sp,
ThreadGroup tg,
ResourceMgr rm) throws ResourceException
- initializes the execution environment prameters and create a new SPThread
- Parameters:
- sp - the SmartPacket object
- tg - the thread group to which the SPThread belongs
- rm - the Resource Manager for the node
- Throws: ResourceException
- if Smartpacket's resource needs exceed global bounds
static void ()
getNumObjects
public int getNumObjects()
- returns the number of objects allocated by the Smartpacket thread
- Returns:
- the number of objects
run
public void run()
- starts SmartPacket thread and monitors cpu
usage.
Cleans up after smartpacket thread exits
notifyExecEnv
public void notifyExecEnv()
- called by SmartPacket thread to notify exec env
setFinalExecTime
public void setFinalExecTime(long execTime)
recordStartTime
protected static void recordStartTime(EventManager evm,
String app)
All Packages Class Hierarchy This Package Previous Next Index