Advertisement

Garbage Collection in an Embedded Java Virtual Machine

  • Chang-Il Cha
  • Hyung-Jun Kim
  • Kyu-Jeong Hwang
  • Sang-Wook Kim
  • Sang-Yun Lee
  • Hee-Sun Won
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4251)

Abstract

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.

Keywords

Young Generation Garbage Collection Pause Time Real Time Requirement Java Virtual Machine 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 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
  3. 3.
    Cheney, C.J.: A non-recursive list compacting algorithm. Communications of the ACM 13(11), 677–678 (1970)MATHCrossRefGoogle Scholar
  4. 4.
    Sun Microsystems, Java2 Platform, Micro Edition, Connected Device Configuration(CDC) (2005), http://java.sun.com/products/cdc/index.jsp
  5. 5.
    Jones, R.E., Lines, R.: Garbage collection: Algorithms for automatic dynamic memory management. Wiley, Chichester (1996)MATHGoogle Scholar
  6. 6.
    Lieberman, H., Hewitt, C.E.: A real-time garbage collector based on the lifetimes of objects. Communications of the ACM 26(6), 419–429 (1983)CrossRefGoogle Scholar
  7. 7.
    Ungar, D.M.: Generation scavenging: A non-disruptive high performance storage reclamation algorithm. ACM SIGPLAN Notices 19(5), 157–167 (1984)CrossRefMathSciNetGoogle Scholar
  8. 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. 9.
    Zorn, B.: Barrier methods for garbage collection, University of Colorado, Technical Report CU-CS-494-90 (November 1990)Google Scholar
  10. 10.
    Lindholm, T., Yellin, F.: The JavaTM Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (1999)Google Scholar
  11. 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. 12.
    CDC reference implementation 1.1 corresponding to JSR 218, http://java.sun.com/products/cdc/index.jsp
  13. 13.
    Stefanović, D., Hertz, M., Blackburn, S.M., McKinley, K.S., Eliot, J., Moss, B.: Older-first garbage collection in practice: evaluation in a Java Virtual Machine. ACM SIGPLAN Notices MSP 2002 38(2), 25–36 (2002)CrossRefGoogle Scholar
  14. 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. 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. 16.
    Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 ed (March 1999)Google Scholar
  17. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Chang-Il Cha
    • 1
  • Hyung-Jun Kim
    • 1
  • Kyu-Jeong Hwang
    • 1
  • Sang-Wook Kim
    • 1
  • Sang-Yun Lee
    • 2
  • Hee-Sun Won
    • 2
  1. 1.Division of Information and CommunicationsHanyang UniversitySeoulKorea
  2. 2.Embedded S/W Research DivisionElectronics and Telecommunications Research InstituteDaejeonKorea

Personalised recommendations