Effect of Garbage Collection in the ZG-machine

ZG-machine에서 기억 장소 재활용 체계의 영향

  • 우균 (동아대학교 전기전자컴퓨터공학부) ;
  • 한태숙 (한국과학기술원 전자전산학과)
  • Published : 2000.07.15

Abstract

The ZG-machine is a space-efficient G-machine, which exploits a simple encoding method, called tag-forwarding, to compress the heap structure of graphs. Experiments on the ZG-machine without garbage collection shows that the ZG-machine saves 30% of heap space and the run-time overhead is no more than 6% than the G-machine. This paper presents the results of further experiments on the ZG-machine with the garbage collector. As a result, the heap-residency of the ZG-machine decreases by 34% on average although the run-time increases by 34% compared to the G-machine. The high rate of the run-time overhead of the ZG-machine is incurred by the garbage collector. However, when the heap size is 7 times the heap-residency, the run-time overhead of the ZG-machine is no more than 12% compared to the G-machine. With the aspect of reduced heap-residency, the ZG-machine may be useful in memory-restricted environments such as embedded systems. Also, with the development of a more efficient garbage collector, the run-time is expected to decrease significantly.

ZG-machine은 태그옮김이라는 간단한 부호화 기법을 채택한 공간 효율적인 G-machine이다. 기억 장소 재활용 체계 없이 실험한 이전 실험에서 ZG-machine은 G-machine과 비교하여 30%의 힙 공간을 절약할 수 있었고 수행 시간 부담은 6%를 넘지 않았었다. 이 논문에서는 ZG-machine에 기억 장소 재활용 체계를 장착하여 추가로 실험한 결과를 설명한다. 결과에 따르면, G-machine과 비교할 때, ZG-machine의 수행 시간은 34% 증가하였지만 최소 힙 사용량은 평균 34% 감소하였다. 수행 시간 부담이 커진 이유는 기억 장소 재활용 체계때문이다. 그러나 힙 공간을 최소 힙 사용량의 7 배 정도로 늘렸을 경우에 G-machine에 대한 수행 시간 부담은 12%를 넘지 않았다. ZG-machine에서 최소 힙 사용량이 줄어든 특성은 ZG-machine이 내장 체계와 같은 기억 장소가 제한된 응용 분야에 사용될 수 있음을 의미한다. 또한 보다 효율적인 기억 장소 재활용 쳬계를 개발함으로써 수행 시간은 상당히 줄어들 것으로 예상 된다.

Keywords

References

  1. L. Augustsson, 'A Compiler for Lazy ML,' In Proceedings of the 1986 ACM Conference on Lisp and Functional Programming, pages 218-227, August 1984 https://doi.org/10.1145/800055.802038
  2. T. Johnsson, 'Efficient compilation and lazy evaluation,' In Proceedings of the ACM SIGPLAN '84 Symposium on Compiler Construction, pages 58-69, June 1984 https://doi.org/10.1145/502874.502880
  3. S. L. Peyton Jones, The Implementation of Functional Programming Languages, Prentice Hall, 1987
  4. G. Woo and T. Han, 'Compressing the Graphs in G-machine by Tag-Forwarding,' Journal of the Korea Information Science Society, 26(5):702-712, May 1999
  5. G. L. Burn, S. L. Peyton Jones, and J. D. Robson, 'The spineless G-machine,' In Proceedings of the 1988 ACM Conference on Lisp and Functional Programming, pages 244-258, July 1988 https://doi.org/10.1145/62678.62717
  6. S. L. Peyton Jones, 'Implementing Lazy Functional Languages on Stock Hardware: the Spineless Tagless G-machine,' Journal of Functional Programming, 2(2):127-202, July 1992
  7. M. P. Jones, Hugs 1.3 User Manual ― The Haskell User's Gofer System, August 1996
  8. D. Wakeling, 'A Haskell to Java Virtual Machine Code Compiler,' Proceedings of the 1997 International Workshop on the Implementation of Functional Languages, pages 39-52, September 1992 https://doi.org/10.1007/BFb0055420
  9. G. Meehan and M. Joy, 'Compiling Lazy Functional Programs to Java Bytecode,' Software-Practice and Experience, 29(7):617-645, June 1999 https://doi.org/10.1002/(SICI)1097-024X(199906)29:7<617::AID-SPE250>3.3.CO;2-5
  10. Thomas Johnsson, Compiling Lazy Functional Languages, PhD thesis, Chalmers Tekniska Hoskola, Goeborg, Sweden, January, 1987
  11. R. R. Fenichel and J. C. Yochelson, 'A LISP Garbage Collector for Virtual Memory Computer Systems,' Communications of the ACM, 12(11):611-612, November 1969 https://doi.org/10.1145/363269.363280
  12. C. J. Cheney, 'A Non-recursive List Compacting Algorithm,' Communications of the ACM, 13(11):677-678, November 1970 https://doi.org/10.1145/362790.362798
  13. W. Partain, 'The nofib Benchmark Suite of Haskell Programs,' In J. Launchbury and P. M. Samson, editors, Functional Programming, Glasgow, Workshops in Computing, pages 195-202, Springer Verlag, 1992
  14. S. L. Peyton Jones and D. R. Lester, Implementing Functional Languages: a tutorial, Prentice Hall, 1991
  15. M. Scheevel, 'NORMA: a graph reduction processor,' In Proceedings of the 1986 ACM Conference on Lisp and Functional Programming, pages 212-219, August 1986 https://doi.org/10.1145/319838.319864
  16. A. R. Haydarlou and P. H. Hartel, 'Thunk Lifting: Reducing Heap Usage in an Implementation of a Lazy Functional Language,' Journal of Functional and Logic Programming, 1(1):1-24, August, 1995
  17. D. Wakeling, 'The Dynamic Compilation of Lazy Functional Programs,' Journal of Functional Programming, 8(1):61-81, January 1998 https://doi.org/10.1017/S0956796897002955
  18. L. Augustsson and T. Johnsson, 'Parallel Graph Reduction with the < ν, G > -machine,' In Proceedings of the ACM Conference on Functional Programming Languages and Computer Architecture, pages 202-213, 1989