In this paper we present a novel scheme for portable CPU accounting and control in Java, which is based on program transformation techniques and can be used with every standard Java Virtual Machine. In our approach applications, libraries, and the Java Development Kit are modified in order to expose details regarding the execution of threads. Each thread accounts for the number of executed bytecode instructions and periodically the threads of an application component aggregate the information of their respective CPU consumption within a shared account and invoke scheduling functions that are able to prevent applications from exceeding their allowed CPU quota.


Bytecode rewriting CPU accounting and control Java program transformations 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Back, G., Hsieh, W., Lepreau, J.: Processes in KaffeOS: Isolation, resource management, and sharing in Java. In: Proceedings of the Fourth Symposium on Operating Systems Design and Implementation (OSDI 2000), San Diego, CA, USA (October 2000)Google Scholar
  2. 2.
    Binder, W.: Design and implementation of the J-SEAL2 mobile agent kernel. In: The 2001 Symposium on Applications and the Internet (SAINT 2001), San Diego, CA, USA (January 2001)Google Scholar
  3. 3.
    Binder, W., Calderon, V.: Creating a resource-aware JDK. In: ECOOP 2002 Workshop on Resource Management for Safe Languages, Malaga, Spain (June 2002),
  4. 4.
    Binder, W., Hulaas, J., Villazón, A., Vidal, R.: Portable resource control in Java: The J-SEAL2 approach. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2001), Tampa Bay, Florida, USA (October 2001)Google Scholar
  5. 5.
    Binder, W., Lichtl, B.:Using a secure mobile object kernel as operating system on embedded devices to support the dynamic upload of applications. LNCS, vol. 2535. Springer, Heidelberg (2002)Google Scholar
  6. 6.
    Binder, W., Roth, V.: Secure mobile agent systems using Java: Where are we heading. In: Seventeenth ACM Symposium on Applied Computing (SAC 2002), Madrid, Spain (March 2002)Google Scholar
  7. 7.
    Czajkowski, G., Daynes, L.: Multitasking without compromise: A virtual machine evolution. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2001), Tampa Bay, Florida (October 2001)Google Scholar
  8. 8.
    Czajkowski, G., von Eicken, T.: JRes: A resource accounting interface for Java. In: Proceedings of the 13th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 1998), October 18–22. ACM SIGPLAN Notices, vol. 33(10), pp. 21–35. ACM Press, New York (1998)CrossRefGoogle Scholar
  9. 9.
    Gosling, J., Joy, B., Steele, G.L., Bracha, G.: The Java language specification, 2nd edn. Java series. Addison-Wesley, Reading (2000)Google Scholar
  10. 10.
    Java Community Process. JSR 121 – Application Isolation API Specification. Web pages, at
  11. 11.
    Lindholm, T., Yellin, F.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)Google Scholar
  12. 12.
    Suri, N., Bradshaw, J.M., Breedy, M.R., Groth, P.T., Hill, G.A., Jeffers, R., Mitrovich, T.S., Pouliot, B.R., Smith, D.S.: NOMADS: toward a strong and safe mobile agent system. In: Sierra, C., Maria, G., Rosenschein, J.S. (eds.) Proceedings of the 4th International Conference on Autonomous Agents (AGENTS 2000), NY, June 3–7, pp. 163–164. ACM Press, New York (2000)CrossRefGoogle Scholar
  13. 13.
    The Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks. Web pages, at
  14. 14.
    Vitek, J., Bryce, C., Binder, W.: Designing JavaSeal or how to make Java safe for agents. Technical report, University of Geneva (July 1998),

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Walter Binder
    • 1
  • Jarle Hulaas
    • 2
  1. 1.Artificial Intelligence LaboratoryEPFLLausanneSwitzerland
  2. 2.Software Engineering LaboratoryEPFLLausanneSwitzerland

Personalised recommendations