An Explicit Dynamic Memory Management Scheme in Java Run-Time Environment

자바 실행시간 환경에서 명시적인 동적 메모리 관리 기법

  • 배수강 (경희대학교 컴퓨터공학과) ;
  • 이승룡 (경희대학교 컴퓨터공학과) ;
  • 전태웅 (고려대학교 컴퓨터정보학과)
  • Published : 2003.02.01

Abstract

The objects generated by the keyword new in Java are automatically managed by the garbage collector Inside Java Virtual Machine (JVM) not like using the keywords free or delete in C or C++ programming environments. This provides a means of freedom of memory management burden to the application programmers. The garbage collector however. inherently has its own run time execution overhead. Thus it causes the performance degradation of JVM significantly. In order to mitigate the execution burden of a garbage collector, we propose a novel way of dynamic memory management scheme in Java environment. In the proposed method, the application programmers can explicitly manage the objects In a simple way, which in consequence the run-time overhead can be reduced while the garbage collector is under processing. In order to accomplish this, Java application firstly calls the APIs that arc implemented by native Jana, and then calls the subroutines depending on the JVM, which in turn support to keep the portability characteristic Java has. In this way, we can not only sustain the stability in execution environments. but also improve performance of garbage collector by simply calling the APIs. Our simulation study show that the proposed scheme improves the execution time of the garbage collector from 10.07 percent to 52.24 percent working on Mark-and-Sweep algorithm.

자바 언어에서 new라는 키워드로 생성된 객체들은 C나 C++언어에서의 free 또는 delete와 같은 키워드를 사용하지 않고 자바가상머신의 쓰레기 수집기에 의하여 자동적으로 관리 (유지 또는 제거) 되어진다. 따라서. 응용프로그래머는 메모리 관리에 대한 부담을 전혀 가지지 않고 프로그래밍을 할 수 있다는 장점이 있다. 그러나, 쓰레기 수집기는 자체 실행시간 오버헤드로 인하여 자바가상머신의 성능을 저하시킨다. 이러한 점을 개선하기 위하여, 본 논문에서는 쓰레기 수집기를 사용하는 자바환경에서 프로그래머가 최소한의 프로그래밍 오버헤드를 가지고 명시적으로 객체를 수거함으로 쓰레기 수집기의 실행시간 오버헤드를 줄일 수 있는 방안을 제시한다. 이를 위하여, 제안된 기법에서는 자바 어플리케이션이 순수 자바로 자성된 API를 호출하고, 이것이 다시 가상머신의 종속적인 루틴을 호출함으로써 자바가 가지는 이식성을 그대로 유지하도록 하였다. 다시 말하면 어플리케이션 수행의 안정성은 유지하면서 프로그래머가 단순히 API만을 호출함으로 자바가상머신의 성능향상을 이룰 수 있게 하였다. 마크-수거(Mark-and-Sweep) 알고리즘에 제안한 방법을 적용한 결과 쓰레기 수집기만으로 작동되는 경우의 객체수거 시간에 비해 최저 10%에서 최고 52% 이상의 수행시간 향상을 보였다.

Keywords

References

  1. Paul R. Wilson, Mark S. Johnstone, Michael Neely and David Boles, 'Dynamic Storage Allocation: A Survey and Critical Review.' International Workshop on Memory Management, Lecture Notes in Computer Science, Vol.986, pp.1-116, 1995
  2. Paul R. Wilson 'Uniprocessor Garbage Collection Techniques.' In Yves Bekkers and Jaques Cohen editors, Proceedings of the 1992 International Workshop on Memory Management, pp.1-42, St Malo, France, pp.17-19, 1992
  3. J. Gosling, B. Joy, and G. Steele, The Java Language Specification, Addison-Wesley, Boston, 1996
  4. T. Lindholm and F. Yellin, The Java Virtual Machine Specification, Addison-Wesley, Boston, 1997
  5. Kaffe.org, Kaffe Java Virtual Machine, http://www.transvirtual.com;http://www.kaffe.org
  6. David Gay and Alex Aiken, 'Memory Management with Explicit Regions.' In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, number 33:5 in SIGPLAN Notices, pp.313-323, 1998
  7. D. T. Ross, 'The AED free storage package.' Comm, ACM, Vol.10, No.8, pp.481-492, 1967 https://doi.org/10.1145/363534.363546
  8. Yuuji Ichisugi and Akinori Yonezawa, 'Distributed garbage collection using group reference counting' In OOPSLA/ECOOP '90 Workshop on Garbage Collection in Object-Oriented Systems, 1990
  9. David R. Hanson, 'Fast allocation and deallocation of memory based on object lifetimes.' Software Practice and Experience, Vol.20, No.1, pp.5-12, 1990 https://doi.org/10.1002/spe.4380200104
  10. Richard Jones and Rafael Lins, Garbage Collection: Algorithms for Automatic Dynamic Memory Management, John Wiley & Sons, England, 1996
  11. Hans-Juergen Boehm and Mark Weiser, 'Garbage Collection in an Uncooperative Environment, Software Practice & Experience,' Software Practice & Experience, Vol.18, No.9, pp.807-820, 1988 https://doi.org/10.1002/spe.4380180902
  12. Hans-Juergen Boehm, 'Space Efficient Conservative Garbage Collection,' In Proceedings of SIGPLAN'93 Conference on Programming Languages Design and Implementation, ACM SIGPLAN Notices, pp.197-206, 1993 https://doi.org/10.1145/155090.155109
  13. Hans-Juergen Boehm, A garbage collector for C and C++, http://www.hpl.hp.com/personal/Hans_Boehm/gc/index.html
  14. The Real-Time for Java Expert Group, The Real-Time specification for Java, Addison-Wesley, Boston, 2001
  15. TimeSys Products and Services - Real-Time Hava, http://www.timesys.com/prodserv/java/index.cfm
  16. Henry G. Baker, 'Cache conscious copying collection,' OOPSLA/ECOOP '91 Workshop on Garbage Collection in Object -Oriented Systems, 1991
  17. Kelvin D. Nilsen and William J. Schmidt, 'A high-performance hardware-assisted real time garbage collection system,' Journal of Programming Languages, Vol.2, No.1, 1994
  18. Bill Venners, Inside the JAVA2 Virtual Machine(2nd edition), McGraw-Hill, 2000
  19. Henry Baker, 'List processing in real time on a serial computer,' CACM, Vol. 21, No.4, pp.280-294, 1978 https://doi.org/10.1145/359460.359470