Abstract
This paper proposes a systematic approach to optimize the code layout of a Java ME virtual machine for an embedded system with a cache-sensitive architecture. A practice example is to run JVM directly (execution-in-place) in NAND flash memory, for which cache miss penalty is too high to endure. The refined virtual machine generated cache misses 96% less than the original version. We developed a mathematical approach helping to predict the flow of the interpreter inside the virtual machine. This approach analyzed both the static control flow graph and the pattern of bytecode instruction streams, since we found the input sequence drives the program flow of the virtual machine interpreter. Then we proposed a rule to model the execution flows of Java instructions of real applications. Furthermore, we used a graph partition algorithm as a tool to deal with the mathematical model, and this finding helped the relocation process to move program blocks to proper memory pages. The refinement approach dramatically improved the locality of the virtual machine thus reduced cache miss rates. Our technique can help Java ME-enabled devices to run faster and extend longer battery life. The approach also brings potential for designers to integrate the XIP function into System-on-Chip thanks to lower demand for cache memory.
We acknowledge the support for this study through grants from National Science Council of Taiwan (NSC 95-2221-E-002 -137).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Sun Microsystem. J2ME Building Blocks for Mobile Devices. Sun Microsystems, Inc. (May 19, 2000)
Park, C., Seo, J., Bae, S., Kim, H., Kim, S., Kim, B.: A Low-Cost Memory Architecture with NAND XIP for Mobile Embedded Systems. In: ISSS+CODES 2003: First IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis. ACM Press, New York (2003)
Samsung Electronics. OneNAND Features & Performance. Samsung Electronics (November 4, 2005)
Park, C., Lim, J., Kwon, K., Lee, J., Min, S.L.: Compiler Assisted Demand Paging for Embedded Systems with Flash Memory. In: Proceedings of the 4th ACM international Conference on Embedded Software (EMSOFT 2004), Pisa, Italy, September 27-29, pp. 114–124. ACM Press, New York (2004)
Parameswaran, S., Henkel, J.: I-CoPES: Fast Instruction Code Placement for Embedded Systems to Improve Performance and Energy Efficiency. In: Proceedings of the 2001 IEEE/ACM International Conference on Computer-Aided Design, pp. 635–641. IEEE Press, Piscataway (2001)
Janapsatya, A., Parameswaran, S., Henkel, J.: REMcode: relocating embedded code for improving system efficiency. In: IEE Proc.-Comput. Digit. Tech., vol. 151(6) (November 2004)
Pettis, K., Hansen, R.: Profile-guided code positioning. In: The Proceedings of the ACM SIGPLAN 1990 Conference on Programming Language Design and Implementation PLDI 1990, vol. 25(6), pp. 16–27. ACM Press, New York (1990)
Young, C., Smith, M.D.: Improving the Accuracy of Static Branch Prediction Using Branch Correlation. In: Proceedings of the 6th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS VI ) (October 1994)
Ball, T., Larus, J.R.: Optimally profiling and tracing programs. ACM Transactions on Programming Languages and Systems 16(4), 1319–1360 (1994)
Van Put, L., Chanet, D., De Bus, B., De Sutler, B., De Bosschere, K.: DIABLO: a reliable, retargetable and extensible link-time rewriting framework. In: The Proceedings of the Fifth IEEE International Symposium on Signal Processing and Information Technology, pp. 7–12. IEEE Press, Piscataway (2005)
Santarini, M.: NAND versus NOR-Which flash is best for bootin’ your next system? In: EDN, Reed Business Information, a division of Reed Elsevier Inc., October 13, pp. 41–48 (2005)
Micron Technology, Inc. Boot-from-NAND Using Micron® MT29F1G08ABA NAND Flash with the Texas InstrumentsTM (TI) OMAP2420 Processor, Micron Technology, Inc. (2006)
Sony Ericsson. JavaTM Support in Sony Ericsson Mobile Phones. Sony Ericsson Mobile Communications AB (2003)
Lafond, S., Lilius, J.: An Energy Consumption Model for Java Virtual Machine. Turku Centre for Computer Science TUCS Technical Report No 597, TUCS (March 2004)
CaffeineMark 3.0, Pendragon Software Corp., http://www.benchmarkhq.ru/cm30
Garey, M.R., Johnson, D.S.: Computer and Intractability - A Guide to the Theory of NP-Completeness. Bell Telephone Laboratories (1979)
Fuber, S.: ARM System-on-Chip Architecture, 2 edn. August 25, pp. 49–72. Addison-Wesley Professional, Reading (2000)
da Silva, A.F., Costa, V.S.: An Experimental Evaluation of JAVA JIT Technology. Journal of Universal Computer Science 11(7), 1291–1309 (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Lin, CC., Chen, CL. (2011). Cache Sensitive Code Arrangement for Virtual Machine. In: Stenström, P. (eds) Transactions on High-Performance Embedded Architectures and Compilers III. Lecture Notes in Computer Science, vol 6590. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-19448-1_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-19448-1_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-19447-4
Online ISBN: 978-3-642-19448-1
eBook Packages: Computer ScienceComputer Science (R0)