X hits on this document

PDF document

Program Transformations for Light-Weight CPU Accounting and Control in the Java Virtual Machine A ... - page 4 / 40





4 / 40


Comparability: CPU consumption statistics collected in different environments are directly comparable, since they are based on the same platform-independent metric.

Portability and compatibility: Because counting the number of executed bytecode instructions does not require any hardware- or operating system-specific support, it can be implemented in a fully portable way. Our CPU management scheme is implemented in pure Java and it is compatible with any standard JVM.

Our CPU management scheme, which is presented in detail in Sec- tion 3, supports the installation of CPU managers that are periodically activated at run-time in order to collect information regarding the num- ber of executed bytecode instructions and to enforce CPU consumption policies. The following design goals underlie our CPU management approach:

Extensibility: Concrete CPU management policies are not hard- coded in our scheme. User-defined CPU managers may implement custom CPU consumption policies and schedulers in pure Java.

Fine-grained activation control: Our CPU management scheme offers a fine-grained, dynamically adjustable activation control of CPU managers. CPU managers themselves specify the interval between subsequent activations. This interval is expressed in terms of the number of bytecode instructions to be executed until the CPU manager will be re-activated.

Deterministic activation: CPU managers are activated in a deterministic way by each thread. For each thread, the activa- tion of a CPU manager depends neither on a timer, nor on the priority of the thread. Independent of the JVM, a thread acti- vates a CPU manager after the execution of a given number of bytecode instructions. Hence, the activation of CPU managers does not rely on the underlying scheduling of the JVM, thereby preserving the portability of our resource management scheme.2 Note, however, that although a CPU manager is activated by each thread in a deterministic manner, the bytecode instrumentation and the execution of management code may affect the scheduling

2 Thread scheduling is left loosely specified in the Java language [19] and JVM [26], in order to facilitate the implementation of Java across a wide variety of environments: While some JVMs seem to provide preemptive scheduling, ensuring that a thread with high priority will execute whenever it is ready to run, other JVMs do not respect thread priorities at all.

Document info
Document views78
Page views78
Page last viewedWed Oct 26 21:28:01 UTC 2016