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

Variable Index

 o AppPredictorTable
 o AppsRecorded
 o clockspeed
 o cpuinfo
 o CPUTime
The length of execution time (in millisecond) Should be less than MAX_CPU_TIME
 o evm
 o IOBandwidth
The I/O bandwidth that this SP can utilize (in bps)
 o memUsage
Estimated memory usage (in bytes) Calculated as the number of objects allocated multiplied by the size of each object
 o numObjects
The number of objects allocated so far by this SPThread
 o rm
 o thread
the Smartpacket thread being monitored
 o threadStarted
test for thread control
 o thStartTime
 o totalMemory
The maximum size of memory which can be allocated by the SmartPacket running this thread (in bytes)

Constructor Index

 o SPExecEnv(KUSmartPacketV2, ThreadGroup, ResourceMgr)
initializes the execution environment prameters and create a new SPThread

Method Index

 o ()
 o getNumObjects()
returns the number of objects allocated by the Smartpacket thread
 o notifyExecEnv()
called by SmartPacket thread to notify exec env
 o recordStartTime(EventManager, String)
 o run()
starts SmartPacket thread and monitors cpu usage.
 o setFinalExecTime(long)

Variables

 o thread
 protected SPThread thread
the Smartpacket thread being monitored

 o numObjects
 protected int numObjects
The number of objects allocated so far by this SPThread

 o memUsage
 protected long memUsage
Estimated memory usage (in bytes) Calculated as the number of objects allocated multiplied by the size of each object

 o CPUTime
 protected long CPUTime
The length of execution time (in millisecond) Should be less than MAX_CPU_TIME

 o totalMemory
 protected int totalMemory
The maximum size of memory which can be allocated by the SmartPacket running this thread (in bytes)

 o IOBandwidth
 protected int IOBandwidth
The I/O bandwidth that this SP can utilize (in bps)

 o threadStarted
 protected boolean threadStarted
test for thread control

 o rm
 protected ResourceMgr rm
 o thStartTime
 protected long thStartTime
 o evm
 protected EventManager evm
 o AppPredictorTable
 protected static Hashtable AppPredictorTable
 o AppsRecorded
 protected static Hashtable AppsRecorded
 o clockspeed
 protected static long clockspeed
 o cpuinfo
 protected static String cpuinfo

Constructors

 o 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

Methods

 o
 static void ()
 o getNumObjects
 public int getNumObjects()
returns the number of objects allocated by the Smartpacket thread

Returns:
the number of objects
 o run
 public void run()
starts SmartPacket thread and monitors cpu usage. Cleans up after smartpacket thread exits

 o notifyExecEnv
 public void notifyExecEnv()
called by SmartPacket thread to notify exec env

 o setFinalExecTime
 public void setFinalExecTime(long execTime)
 o recordStartTime
 protected static void recordStartTime(EventManager evm,
                                       String app)

All Packages  Class Hierarchy  This Package  Previous  Next  Index
1