E-Bunny: A Dynamic Compiler for Embedded Java Virtual Machines
2005, The Journal of Object Technology
Abstract
A new acceleration technology for Java embedded virtual machines is presented in this paper. Based on the selective dynamic compilation technique, this technology addresses the J2ME/CLDC (Java 2 Micro Edition for Connected Limited Device Configuration) platform. The primary objective of our work is to come up with an efficient, lightweight and low-footprint accelerated embedded Java Virtual Machine. This is achieved by the means of integrating a selective dynamic compiler that we called E-Bunny into the J2ME/CLDC virtual machine KVM. This paper presents the motivations, the architecture, the design and the implementation issues of E-Bunny and how we addressed them. Experimental results on the performance of our modified KVM demonstrate that we accomplished a speedup of 400% with respect to the Sun's latest version of KVM. This experimentation was carried on using standard J2ME benchmarks. 1 MOTIVATIONS AND BACKGROUND With the advent and rising popularity of wireless systems, there is a proliferation of small internet-enabled devices (e.g. PDAs, cell phones, pagers, etc.). In this context, Java is emerging as a standard execution environment due to its security, portability, mobility and network support features. In particular, J2ME/CLDC (Java 2 Micro-Edition for Connected Limited Device Configuration) [13] is now recognized as the standard Java platform in the domain of mobile wireless devices such as pagers, handheld PDAs, TV set-top boxes, appliances, etc. It gained big momentum and is now standardized by the Java Community Process (JCP) and adopted by many standardization bodies such as 3GPP, MEXE and OMA. Another factor that has amplified the wide industrial adoption of J2ME/CLDC is the broad range of Java based solutions that are available in the market. All these factors make Java and J2ME/CLDC an ideal solution for software development in the arena of embedded systems. The heart of J2ME/CLDC technology is Sun's Kilobyte Virtual Machine (KVM) [14]. The KVM is a Java virtual machine initially designed with the constraints of
References (23)
- B. Alpern, C. Attanasio, J. Barton, M. Burke, P. Cheng, J. Choi, A. Cocchi, S. Fink, D. Grove, S. Hummel M. Hind, D. Lieber, V. Litvinov, M. Mergen, T. Ngo, J. Russell, V. Sarkar, M. Serrano, J. Shepherd, S. Smith, V. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño Virtual Machine. IBM Systems Journal, 39(1):211-238, February 2000.
- M. Cierniak, G. Lueh, and J. Stichnoth. Practicing JUDO: Java under Dynamic Optimizations. In Proceedings of SIGPLAN 2000 Conference on Programming Languages Design and Implementation, pages 13-26, Vancouver, Canada, June 2000.
- G. Comeau. Java Companion Processors versus Accelerators. http://www. zucotto.com, 2002.
- Nazomi Communications. Boosting the performance of Java Software on Smart Handheld Devices and Internet Appliance. http://www.nazomi.com, April 2002.
- T. Cramer, R. Friedman, T. Miller, D. Seherger, R. Wilson, and M. Wolczko. Compiling Java Just in Time. IEEE Micro, 17(3):36-43, 1997.
- E. Gagnon and L. Hendren. Effective inline-threaded interpretation of java bytecode using preparation sequences. In Proceedings of Compiler Construc- tion, 12th International Conference, CC 2003, Held as Part of the Joint Euro- 102 JOURNAL OF OBJECT TECHNOLOGY VOL 4, NO. 1
- pean Conferences on Theory and Practice of Software, ETAPS 2003, Warsaw, Poland, April 7-11, 2003, volume 2622 of Lecture Notes in Computer Science, pages 170-184. Springer-Verlag, 2003.
- C.-H. A. Hsieh, J. C. Gyllenhaal, and W. W. Hwu. Java Bytecode to Native Code Translation: the Caffeine Prototype and Preliminary Results. In IEEE, editor, Proceedings of the 29th annual IEEE/ACM International Symposium on Microarchitecture, December 2-4, 1996, Paris, France. IEEE Computer Society Press, 1996.
- Intel. IA-32 Intel Architecture Software Developer's Manual Volume 1: Basic Architecture. Intel Corporation, California, USA, order number 245470 edition, 2000.
- T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison Wesley, 1996.
- S. M. Majercik and M. L. Littman. Using Caching to Solve Larger Probabilistic Planning Problems. In Proceedings of the 15th National Conference on Artificial Intelligence (AAAI-98) and of the 10th Conference on Innovative Applications of Artificial Intelligence (IAAI-98), pages 954-960, Menlo Park, July 26-30 1998. AAAI Press.
- F. Maruyama. OpenJIT 2: The Design and Implementation of Application Framework for JIT Compilers. In USENIX, editor, Proceedings of the Java Virtual Machine Research and Technology Symposium (JVM'01): April 23-24, 2001, Monterey, California, USA. Berkeley, CA, Berkeley, CA, USA, 2001. USENIX.
- Sun MicroSystems. The Java HotSpot Performance Engine Architecture. Tech- nical report, Sun MicroSystems, California, USA, April 1999.
- Sun MicroSystems. Connected, Limited Device Configuration. Specification Version 1.0, Java 2 Platform Micro Edition. Technical report, Sun MicroSys- tems, California, USA, May 2000.
- Sun MicroSystems. KVM Porting Guide. Technical report, Sun MicroSystems, California, USA, September 2001.
- Sun MicroSystems. CLDC HotSpot Implementation Virtual Machine. Technical report, Sun MicroSystems, California, USA, 2002.
- R. Radhakrishnan, N. Vijaykrishnan, L. John, A. Sivasubramaniam, J. Rubio, and J. Sabarinathan. Java Runtime Systems: Characterization and Architec- tural Implications. IEEE Transactions on Computers, 50(2):131-146, 2001.
- K. Schmid. Esmertec's Jbed Micro Edition CLDC and Jbed Profile for MID. Technical report, Esmertec AG, Dubendorf, Switzerland, Spring 2002. VOL 4, NO. 1 JOURNAL OF OBJECT TECHNOLOGY 103
- N. Shaylor. A Just-in-Time Compiler for Memory-Constrained Low-Power De- vices. In Proceedings of the 2nd Java Virtual Machine Research and Technology Symposium, pages 119-126, San Francisco, CA, USA, August 2002.
- T. Suganuma, T. Ogasawara, M. Takeuchi, T. Yasue, M. Kawahito, K. Ishizaki, H. Komatsu, and T. Nakatani. Overview of the IBM Java Just-in-Time Com- piler. IBM Systems Journal, 39(1):175-193, 2000.
- T. Suganuma, T. Yasue, M. Kawahito, H. Komatsu, and T. Nakatani. A Dy- namic Optimization Framework for a Java Just-in-Time Compiler. ACM SIG- PLAN Notices, 36(11):180-195, November 2001.
- B. Yang, S.M. Moon, S. Park, J. Lee, S. Lee, J. Park, Y.C. Chung, S. Kim, K. Ebcioglu, and E. Altman. LaTTe: A Java VM just-in-time compiler with fast and efficient register allocation. In Proceedings of the 1999 International Conference on Parallel Architectures and Compilation Techniques (PACT '99), pages 128-138, Newport Beach, California, October 12-16, 1999. IEEE Com- puter Society Press.
- Abdelouahed Gherbi received his Engineering degree in Com- puter Engineering in 1992 and his Master degree in 1997, from the University of Constantine, Algeria. He is a Ph.D. student in the Electrical and Computer Engineering Department at Concordia Uni- versity in Montreal. The main topic of his research activities is the acceleration of embedded Java virtual machines. He can be reached at gherbi@ciise.concordia.ca. Lamia Ketari is a researcher at CSA (Computer Security and Acceleration) research group at Concordia Institute for Informa- tion Systems Engineering, Concordia University, Montreal, Quebec, Canada. She holds an MBA in Management Information Systems form Laval University. Currently, she is pursuing a Ph.D. thesis on the acceleration of Java for wireless devices and semantic-based op- timization correctness. In the past, she worked on malicious code detection in COTS (Commercial Off-The-Shelf) applications. More specifically, she worked, with the collaboration of other research group members, on the implementation of a tool for monitoring crit- ical system resources for malicious code detection, called: DaMon (Dynamic Analysis Monitoring). She can be reached at ketari@ciise.concordia.ca. Chamseddine Talhi is a researcher at CSA (Computer Security and Acceleration) research group at Concordia Institute for Informa- tion Systems Engineering, Concordia University, Montreal, Quebec, Canada. He holds an M.Sc. degree from Constantine University, Algeria. He is pursuing a Ph.D. thesis on the security of embedded Java platforms. He is interested in characterizing enforceable secu- rity policies in resource-constrained platforms. In the past years, he worked on formal specification and verification of telecommunica- tion services. He participated in the design and the implementation of a Java optimizing compiler for J2ME/CLDC. He can be reached at talhi@ciise.concordia.ca.