Garbage Collection in an Embedded Java Virtual Machine
Garbage collection in the Java virtual machine is a core component that relieves application programmers of difficulties related to memory man-agement. It should also take into account the characteristics of embedded envi-ronments. In this paper, we propose a garbage collector that meets the require-ments for embedded environments. The proposed garbage collector is primarily based on generational garbage collection where a heap is composed of young and old generations. A semi-space copying collector is employed for a young generation, and an incremental copying collector is employed for an old genera-tion. Owing to its contiguous allocations, the proposed method provides fast al-locations and the locality of references. By adjusting the size of a young genera-tion, the block size, and the number of blocks in a frame, it is able to control the delay time caused by garbage collection, and thus guarantee the real time con-straints. Also, it employs a novel write barrier mechanism for efficiently deter-mining reachable objects in a specific frame. With all these characteristics to-gether, the proposed garbage collector can reclaim all the garbage objects precisely as well as timely. To reveal its superiority, we perform a series of ex-periments.
KeywordsYoung Generation Garbage Collection Pause Time Real Time Requirement Java Virtual Machine
Unable to display preview. Download preview PDF.
- 1.Barrett, D.A., Zorn, B.G.: Using lifetime predictors to improve memory allocation performance. In: Proceedings of SIGPLAN Conference on Programming Languages Design and Implementation(PLDI), June 1993, vol. 24(7), pp. 187–196 (1993)Google Scholar
- 2.Blackburn, S.M., Cheng, P., McKinley, K.S.: Myths and reality: The performance impact of garbage collection. In: Proceedings of International Conference on Measurement and Modeling of Computer Systems, June 2004, pp. 25–36 (2004)Google Scholar
- 4.Sun Microsystems, Java2 Platform, Micro Edition, Connected Device Configuration(CDC) (2005), http://java.sun.com/products/cdc/index.jsp
- 8.Zorn, B.G.: Comparative performance evaluation of garbage collection algorithms, PhD thesis, University of California at Berkeley, Technical Report UCB/CSD 89/544 (March 1989)Google Scholar
- 9.Zorn, B.: Barrier methods for garbage collection, University of Colorado, Technical Report CU-CS-494-90 (November 1990)Google Scholar
- 10.Lindholm, T., Yellin, F.: The JavaTM Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)Google Scholar
- 11.Chen, G., Shetty, R., Kandemir, M., Vijaykrishnan, N., Irwin, M.J., Wolczko, M.: Tuning Garbage Collection in an Embedded Java Environment. In: High-Performance Computer Architecture, 2002. Proceedings. Eighth International Symposium, February 2002, pp. 92–103 (2002)Google Scholar
- 12.CDC reference implementation 1.1 corresponding to JSR 218, http://java.sun.com/products/cdc/index.jsp
- 14.Stefanović, D., McKinley, K.S., Eliot, J., Moss, B.: Age-based garbage collection. ACM SIGPLAN Notices, OOPSLA 1999 34(10), 370–381 (1999)Google Scholar
- 15.Hansen, L.T., Clinger, W.D.: An experimental study of renewal-older-first garbage collection. ACM SIGPLAN Notices, ICFP 2002 37(9), 247–258 (2002)Google Scholar
- 16.Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 ed (March 1999)Google Scholar
- 17.Hansen, L.T., Clinger, W.D.: An experimental study of renewal-older-first garbage collection. ACM SIGPLAN Notices, ICFP 2002 37(9), 247–258 (2002)Google Scholar