All Packages Class Hierarchy This Package Previous Next Index
Class magician.Node.ResourceMgr
java.lang.Object
|
+----magician.Node.ResourceMgr
- public class ResourceMgr
- extends Object
- implements PerfConstants
Controls the resources of the active node such as cpu and memory. It is
started up by the node manager during initial startup
- See Also:
- ActiveNodeManager, SPThread
-
MAX_CPU_TIME
- Maximum execution time of a thread (in milliseconds)
-
maxSP
- Maximum number of Smart Packet which can be processed
simultaneously.
-
objectPerThread
- Maximum number of objects which can be created
by a thread
-
resMon
- ResourceMonitor thread executes continuously to check on resource
consumption of active threads
-
scheduler
- Scheduler thread also executes continuously to schedule threads
-
smallStates
- A table of reference to the small states managed by the ResourceMgr
-
threadgroup
- All managed spThreads belong to "Smart Packets" ThreadGroup
-
ResourceMgr(int, long, long)
- initializes the ResourceMgr
-
newStorage(String)
- Allocate storage for new object
-
newThread(KUSmartPacketV2)
- Allocates a new thread for the SmartPacket
and schedules it for execution
resMon
protected ResourceMonitor resMon
- ResourceMonitor thread executes continuously to check on resource
consumption of active threads
scheduler
protected Scheduler scheduler
- Scheduler thread also executes continuously to schedule threads
threadgroup
protected ThreadGroup threadgroup
- All managed spThreads belong to "Smart Packets" ThreadGroup
smallStates
Vector smallStates
- A table of reference to the small states managed by the ResourceMgr
objectPerThread
protected static long objectPerThread
- Maximum number of objects which can be created
by a thread
MAX_CPU_TIME
protected static final long MAX_CPU_TIME
- Maximum execution time of a thread (in milliseconds)
maxSP
protected int maxSP
- Maximum number of Smart Packet which can be processed
simultaneously. We may want to limit this to ensure
timely execution of the threads
ResourceMgr
public ResourceMgr(int maxSP,
long maxObjects,
long execTime)
- initializes the ResourceMgr
- Parameters:
- maxSP - the maximum number of Smartpacket threads that can run concurrently
- maxObjects - the maximum number of objects that can be allocated by a
Smartpacket
- execTime - the maximum allowable execution time
newThread
public void newThread(KUSmartPacketV2 sp)
- Allocates a new thread for the SmartPacket
and schedules it for execution
- Parameters:
- sp - the Smartpacket object that requires execution
newStorage
public SPStorage newStorage(String className)
- Allocate storage for new object
- Parameters:
- className - class of new object
All Packages Class Hierarchy This Package Previous Next Index