Compact Field Remapping for Dynamically Allocated Structures

동적으로 할당된 구조체를 위한 압축된 필드 재배치

  • 김정은 (한국과학기술원 전산학과) ;
  • 한환수 (한국과학기술원 전산학과)
  • Published : 2005.10.01

Abstract

The most significant difference of embedded systems from general purpose systems is that embedded systems are allowed to use only limited resources including battery and memory. Especially, the number of applications increases which deal with multimedia data. In those systems with high data computations, the delay of memory access is one of the major bottlenecks hurting the system performance. As a result, many researchers have investigated various techniques to reduce the memory access cost. Most programs generally have locality in memory references. Temporal locality of references means that a resource accessed at one point will be used again in the near future. Spatial locality of references is that likelihood of using a resource gets higher if resources near it were just accessed. The latest embedded processors usually adapt cache memory to exploit these two types of localities. Processors access faster cache memory than off-chip memory, reducing the latency. In this paper we will propose the enhanced dynamic allocation technique for structure-type data in order to eliminate unused memory space and to reduce both the cache miss rate and the application execution time. The proposed approach aggregates fields from multiple records dynamically allocated and consecutively remaps them on the memory space. Experiments on Olden benchmarks show $13.9\%$ L1 cache miss rate drop and $15.9\%$ L2 cache miss drop on average, compared to the previously proposed techniques. We also find execution time reduced by $10.9\%$ on average, compared to the previous work.

내장형 시스템과 범용 시스템의 가장 큰 차이는 유한한 전력인 배터리를 사용한다는 것과 대용량의 디스크를 사용하지 않고 메모리에 의존한다는 것이다. 특히 멀티미디어 데이타를 처리하는 응용프로그램이 늘어감에 따라 메모리 사용량이 기하급수적으로 증가하고 있어서 메모리가 성능과 에너지 소비의 병목지점으로 작용하게 되었다. 따라서 데이타 접근 비용을 줄이고자 하는 시도가 많이 이루어지고 있다. 대부분의 프로그램은 지역성을 갖는다. 지역성은 한번 참조된 데이타가 조만간 다시 참조된다는 시간적 지역성(temporal locality)과 근접한 곳에 할당된 데이타끼리 함께 참조된다는 공간적 지역성(spatial locality)으로 나눌 수 있다. 최근의 많은 임베디드시스템은 이 두 가지 지역성을 이용한 캐시 메모리를 사용함으로써 메모리 접근 시간을 대폭 줄이고 있다. 우리는 이 논문에서 낭비되는 메모리 공간을 줄이고, 캐시 실패율(cache miss rate)과 프로그램 수행시간을 줄일 수 있도록 구조체 형식의 데이타를 항목(field)별로 재배치시키는 알고리즘을 제안하고자 한다. 이 알고리즘은 동적으로 할당되는 구조체의 각 필드를 압축된 형태로 모아서 재배치함으로써, 실험에서 사용한 Olden 벤치마크의 Ll캐시 실패는 평균 $13.9\%$를, L2 캐시 실패는 평균 $15.9\%$를 이전 연구들보다 줄일 수 있었다. 수행시간 또한 이전의 방법보다 평균 $10.9\%$ 줄인 결과를 얻을 수 있었다.

Keywords

References

  1. P. Panda, F. Catthoor, N. Dutt, K. Danckaert, E. Brockmeyer, C. Kulkrani, A. Vandercappelle, and P. Kjeldsberg. Data and memory optimization techniques for embedded systems. ACM Transactions on Design Automation of Electronic Systems, Vol.7, No.2, pp.149-206, April 2001 https://doi.org/10.1145/375977.375978
  2. P. Panda, N. Dutt, and A. Nicolau. Memory Issues In Embedded Systems-On-Chip : Optimizations and Exploration. Kluwer Academic Publishers, 1999
  3. T. Chilimbi, M. Hill, and J. Larus. Cache-conscious structure layout. 1986. In Proceedings of the ACM SICPLAN Conference on Programming Language Design and Implementation, pp.1-12, May 1999 https://doi.org/10.1145/301618.301633
  4. T. Kistler and M. Franz. Automated data-member layout of heap objects to improve memory-hierarchy performance. ACM transactions on Programming Languages and Systems, Vol.22, No.3, pp.490-505, May 2000 https://doi.org/10.1145/353926.353937
  5. P. Panda, N. Dutt, and A. Nicolau. Memory data reorganization for improved cache performance in embedded processor applications. ACM Transactions on Design Automation of Electronic Systems, Vol.2, No.4, pp.384-409, 1997 https://doi.org/10.1145/268424.268464
  6. D. N. Truong, F. Bodin, and A. Seznec, Improving cache behavior of dynamically allocated data structures. Proceedings of the 1998 International Conference on Parallel Architectures and Compilation Techniques, p.322, 1998 https://doi.org/10.1109/PACT.1998.727268
  7. T. Chilimbi, B. Davison, and J. Larus. Cache-Conscious Structure Definition. Proceedings of the ACM SIGPLAN 1999 conference on Programming Language Design and Implementation, pp.13-24, 1999 https://doi.org/10.1145/301618.301635
  8. R. M. Rabbah and K. V. Palem. Data Remapping for Design Space Optimization of Embedded Memory Systems. ACM Trans. On Embedded Computing Systems., Vol.2, No.2, pp.186-218, May 2003 https://doi.org/10.1145/643470.643474