Java Garbage Collection for a Small Interactive System

소규모 대화형 시스템을 위한 자바 가비지 콜렉션

  • 권혜은 (세명대학교 대학원 전산정보학과) ;
  • 김상훈 (세명대학교 컴퓨터정보학부)
  • Published : 2002.12.01

Abstract

Garbage collection in the CLDC typically employs a stop-the-world GC algorithm which is performing a complete garbage collection when needed. This technique is unsuitable for the interactive Java embedded system because this can lead to long and unpredictable delays. In this paper, We present a garbage collection algorithm which reduces the average delay time and supports the interactive environment. Our garbage collector is composed of the allocator and the collector. The allocator determines the allocation position of free-list according to object size, and the collector uses an incremental mark-sweep algorithm. The garbage collector is called periodically by the thread scheduling policy and the allocator allocates the objects of marked state during collection cycle. Also, we introduce a color toggle mechanism that changes the meaning of the bit patterns at the end of the collection cycle. We compared the performance of our implementation with stop-the-world mark-sweep GC. The experimental results show that our algorithm reduces the average delay time and that it provides uniformly low response times.

CLDC는 가비지 콜렉션을 위해, 가비지 콜렉션이 필요한 시점에 모든 작업을 수행하는 스탑더 월드 가비지 콜렉션 알고리즘을 일반적으로 사용한다. 이 방법은 길고 예측할 수 없는 지연시간으로 인하여 대화형 자바 임베디드 시스템에서는 부적당하다. 본 논문에서는 평균 지연시간을 줄이고 대화형 환경을 지원하는 가비지 콜렉션 알고리즘을 제안한다. 가비지 콜렉터는 객체의 크기에 따라 할당 위치를 결정하는 할당기와 점진적 마크-회수 알고리즘을 사용하는 콜렉터로 구성된다. 가비지 콜렉터는 스레드 스케줄링 정책에 따라 주기적으로 호출되며, 할당기는 콜렉션 주기 동안 마크된 상태의 객체를 할당한다. 또한 콜렉션 주기의 마지막에 비트 패턴의 의미를 교환하는 칼라토글방식을 사용한다. 제안한 가비지 콜렉터와 스탑더월드 마크-회수 가비지 콜렉터의 성능을 비교하였으며, 이 비교 실험을 통해 평균 지연시간은 감소하고, 균일하고 낮은 응답시간을 제공함을 확인하였다.

Keywords

References

  1. James Gosling, Henry McGilton, The Java Language Environment a White Paper, Sun Microsystems, 1996
  2. Sun Microsystems, Java 2 Platform Micro Edition(J2ME) Technology for Creating Mobile Devices White Paper, Sun Microsystems, 2000
  3. Sun Microsystems, Connected, Limited Device Configuration Specification Version 1.0a Java 2 Platform Micro Edition, Sun Microsystems, 2000
  4. Tim Lindholm, Frank Yellin, The Java Virtual Machine Specification Second Edition, Addison Wesley, 1999
  5. Paul. R. Wilson, 'Uniprocessor Garbage Collection Techniques,' Technical report, University of Texas, Jan 1994. Expanded version of the IWMM92 paper
  6. William M. Newman, Michael G. Lamming, Interactive System DESIGN, Addison-Wesley, 1995
  7. Roger Henriksson, Scheduling Garbage Collection in Embedded Systems, PhD thesis, Lund University, 1998
  8. Perry Cheng, Guy E. Blelloch, 'A Parallel, Real-Time Garbage Collector,' ACM SIGPLAN Conference on Programming Design and Implementation, pp. 125-136, 2001
  9. Sun Microsysterns, The HotSpot Virtual Machine Technical White Paper, Sun Microsystems, 2001
  10. Jacob Seligmann, Steffen Grarup, 'Incremental Mature Garbage Collection Using the Train Algorithm,' In European Conference on Object-Oriented Programming. Springer-Verlag, pp. 235252, 1995
  11. Shogo Matsui, Yoshio Tanaka, Atsushi Maeda, Masakazu Nakanishi, 'Complementary Garbage Collector,' The Transactions of Information Processing Society of Japan, Vol.36, No.8, pp. 1874-1884, 1995
  12. Frank Yellin, Inside the The K Virtual Machine (KVMl, http://servlet.java.sun.com/javaone/javaone2000/pdfs/TS-1507.pdf, 2000
  13. Paul R. Wilson, Mark S. Johnstone, Michael Neely, David Boles, 'Dynamic Storage Allocation: A Survey and Critical Review,' Proceedings of International Workshop on Memory Management, Lecture Notes in Computer Science, Vol.986, pp. 1-116, 1995 https://doi.org/10.1007/3-540-60368-9_19
  14. Tuning Garbage Collection with the 1.3.1 Java Virtual Machine, http://java.sun.com/docs/hotspot/gc
  15. Tamar D., Elliot K. K., Ethan L. Eliot E. S., Katherine B., Itai L., Erez P., Igor Y. Yossi L., 'Implementing an On-the-fly Garbage Collector for Java,' Proceedings of the ACM SIGPLAN Symposium on Memory Management, pp. 155-166, 2000 https://doi.org/10.1145/362422.362484