DOI QR코드

DOI QR Code

Cache Memory and Replacement Algorithm Implementation and Performance Comparison

  • Park, Na Eun (Dept. of Convergence Security Engineering, Sungshin Women's University) ;
  • Kim, Jongwan (Smith College of Liberal Arts, Sahmyook University) ;
  • Jeong, Tae Seog (Dept. of Business Administration, Sahmyook University)
  • 투고 : 2020.03.05
  • 심사 : 2020.03.26
  • 발행 : 2020.03.31

초록

본 논문은 캐시 시뮬레이션을 통해 각 교체 알고리즘의 캐시 히트(Cache Hit) 및 검색시간을 측정함으로써 캐시 교체 정책에 대한 실용적인 결과를 제시한다. 프로세서의 성능이 향상되면서 캐시 메모리 또한 성능을 향상하기 위한 많은 연구가 활발히 진행되고 있다. 캐시 메모리는 일반적으로 LRU(Least Recently Used) 교체방식을 사용하고 있으며 LRU 방식 이외에도 대표적으로 FIFO(First-In First-Out), LFU(Least Frequently Used) 및 Random 교체방식이 있다. 논문에서는 캐시 메모리 구조 및 교체 알고리즘을 소프트웨어로 구현하여 각 기법의 특징을 분석한다. 논문의 실험결과 LRU 알고리즘이 균등 분포에서 36.044%, 577.936ns, 편향 분포에서 45.636%, 504.692ns의 히트율(Hit ratio)과 검색시간을 보였으며, FIFO 알고리즘은 균등 분포에서 36.078%, 554.772ns, 편향 분포에서 45.662%, 489.574ns로 LRU와 유사한 성능을 보였다. Random 교체방식은 균등 분포에서 30.042%, 622.866ns, 편향 분포에서 36.36%, 553.878%로 가장 낮은 성능을 보였다. 이는 캐시 메모리에서 일반적으로 사용되는 LRU 교체방식이 타 교체 알고리즘보다 최선의 성능을 보이면서도 데이터의 참조 정보를 고려하는 합리적인 알고리즘임을 나타내는 것이다.

In this paper, we propose practical results for cache replacement policy by measuring cache hit and search time for each replacement algorithm through cache simulation. Thus, the structure of each cache memory and the four types of alternative policies of FIFO, LFU, LRU and Random were implemented in software to analyze the characteristics of each technique. The paper experiment showed that the LRU algorithm showed hit rate and search time of 36.044% and 577.936ns in uniform distribution, 45.636% and 504.692ns in deflection distribution, while the FIFO algorithm showed similar performance to the LRU algorithm at 36.078% and 554.772ns in even distribution and 45.662% and 489.574ns in bias distribution. Then LFU followed, Random algorithm was measured at 30.042% and 622.866ns at even distribution, 36.36% at deflection distribution and 553.878ns at lowest performance. The LRU replacement method commonly used in cache memory has the complexity of implementation, but it is the most efficient alternative to conventional alternative algorithms, indicating that it is a reasonable alternative method considering the reference information of data.

키워드

참고문헌

  1. Jongjung Woo, "Computer Architecture," Hanbit Academy, 2014.
  2. Jeong-Gook Koh, "Design and Implementation or a Web-based Simulator for Educating Page Replacement Algorithms," Journal of Korea Multimedia Society, Vol. 15, No. 4, Korea Multimedia Society, Korea, pp. 552-559, April 2012. https://doi.org/10.9717/kmms.2012.15.4.552
  3. Chang-Gweon Son, Seung-Gi Lee, Seung-Gu Lee, Seung-HeeKim, "An Exploratory Study on the Effects of Reference Locality on Page Replacement Performance," The Journal of Korean Institute of Information Technology, Vol. 15, No. 9, pp. 37-47, Korean Institute of Information Technology, Korea, September 2017, DOI: 10.14801/jkiit.2017.15.9.37
  4. Mikyung Lee, Duki Lee, Mincheol Shin, Sanghyun Park, "SWSC(Sequential Write Spatial Clock) Buffer Replacement Algorithm For Mobile Flash Storage," Proceedings of the Korea Information Processing Society Conference, Vol. 21, No. 2, pp. 771-774, Korea Information Processing Society, Korea, November 2014.
  5. Donghee Lee, Sam H. Noh, Sang Lyul Mim, Yookun Cho, "LRFU: A Block Replacement Policy which exploits Infinite History of References," Journal of KISS(A): Computer Systems and Theory Vol. 24, No. 7, pp. 632-641, The Korean Institute of Information Scientists and Engineers, Korea, July 1997.
  6. Seunghoon Lee, Jongmoo Choi, Seongje Cho, Yookun Cho, "Memory Reference Patterns and Page Replacement Policies," Journal of The Korean Institute of Information Scientists and Engineers Vol. 27, No. 2, pp. 50-52, The Korean Institute of Information Scientists and Engineers, Korea, October 2000.
  7. Jae-Seung Ko, Joon-Won Lee, Heon-Young Yeom, "An Alternative Scheme to LRU for Efficient Page Replacement," Journal of KISS(A): Computer Systems and Theory Vol. 23, No. 5, pp. 478-4 86, The Korean Institute of Information Scientists and Engineers, Korea, May 1996.
  8. JongIck Lee, SeungIl Sonh, MoonKey Lee. "The Performance Comparison of the True-LRU and the Pseudo-LRU Algorithm in Cache Memory," Journal of KISS(A): Computer Systems and Theory Vol. 23, No. 11, pp. 1148-1160, The Korean Institute of Information Scientists and Engineers, Korea, November 1996.
  9. Seon Kim, Sungjae Lee, Inhwan Lee, "Buffer Cache Block Replacement Algorithm Based on LRU and Prefetching," Journal of The Korean Institute of Information Scientists and Engineers Vol. 37, No. 2B, pp. 298-303, The Korean Institute of Informativon Scientists and Engineers, Korea, November 2010.
  10. Hyoil Lee, Sooyoung Kim, Jonghyun Kim, "Performance Analysis of Replacement Policies for Internet Proxy Cache," Journal of The 1999 Fall Conference of The Korea Society For Simulation, pp. 138-143, The Korea Society For Simulation, Korea, October 1999.
  11. Jungmin Yoo, Hoongyu Choi, Ted "Taekyong" Kwon, Yanghee Choi, "Performance comparison of Cache replacement policy in Named Data Network," Proceedings of Symposium of the Korean Institute of communications and Information Sciences (Fall), pp. 7-8, Korea Institute Of Communication Sciences, Korea, November 2013.
  12. Do Young Jung, Yong Surk Lee, "Cache Replacement Policy Based on Dynamic Counter for High Performance Processor," Journal of the Institute of Electronics Engineers of Korea Vol. 50, No. 4, pp. 52-58, The Institute of Electronics and Information Engineers, Korea, Apirl 2013.
  13. Duk Jun Bang, "An Adaptive Cache Replacement Policy to Evict Dirty Block for Last-Level-Cache," The Graduate School Sejong University, February 2015.
  14. Inkook Chun, Yonghae Kong, Sangho Ha, "Easily written data structure in C language," Saengneung Publisher, 2019.
  15. Microsoft docs, C/C++ Compiler and build tools errors and warnings, https://docs.microsoft.com.