A Page Replacement Scheme Based on Recency and Frequency

최근성과 참조 횟수에 기반한 페이지 교체 기법

  • Lee, Seung-Hoon (Dept.of Computer Science Statistics, Graduate School of Dankook University) ;
  • Lee, Jong-Woo (Dept. of Information Communication Engineering, Hallym University) ;
  • Cho, Seong-Je (Dept.of Computer Science Statistics, Graduate School of Dankook University)
  • 이승훈 (단국대학교 대학원 전산통계학과) ;
  • 이종우 (한림대학교 정보통신공학부) ;
  • 조성제 (단국대학교 전산통계학과)
  • Published : 2001.12.01

Abstract

In the virtual memory system, page replacement policy exerts a great influence on the performance of demand paging. There are LRU(Least Recently Used) and LFU (Least Frequently Used) as the typical replacement policies. The LRU policy performs effectively in many cases and adapts well to the changing workloads compared to other policies. It however cannot distinguish well between frequently and infrequently referenced pages. The LFU policy requires that the page with the smallest reference count be replaced. Though it considers all the references in the past, it cannot discriminate between references that occurred far back in the past and the more recent ones. Thus, it cannot adapt well to the changing workload. In this paper, we first analyze memory reference patterns of eight applications. The patterns show that the recently referenced pages or the frequently referenced pages are accessed continuously as the case may be. So it is rather hard to optimize page replacement scheme by using just one of the LRU or LFU policy. This paper makes an attempt to combine the advantages of the two policies and proposes a new page replacement policy. In the proposed policy, paging list is divided into two lists (LRU and LFU lists). By keeping the two lists in recency and reference frequency order respectively, we try to restrain the highly referenced pages in the past from being replaced by the LRU policy. Results from trace-driven simulations show that there exists points on the spectrum at which the proposed policy performs better than the previously known policies for the workloads we considered. Especially, we can see that our policy outperforms the existing ones in such applications that have reference patterns of re-accessing the frequently referenced pages in the past after some time.

운영체제의 가상 메모리 시스템에 적용할 페이지 교체 정책은 요구 페이징 시스템의 성능에 큰 영향을 미친다. 대표적인 메모리 페이지 교체 정책으로는 LRU와 LFU가 있다. LRU 정책은 많은 경우에 좋은 성능을 보이며 시스템 부하 변화에 잘 적응하지만, 자주 참조되는 페이지와 가끔 참조되는 페이지를 구별하지 못한다. LFU 정책은 참조 횟수가 가장 작은 페이지를 교체하는 기법으로, 과거의 모든 참조를 반영하지만 이전에 참조된 페이지와 최근에 참조된 페이지를 식별하지 못한다. 따라서 LFU는 변화하는 작업 부하에 잘 적응하지 못한다. 본 논문에서는 먼저 8개의 응용에 대해 메모리 참조 패턴을 분석하여 보았다. 그 참조 패턴을 보면 어떤 경우에는 최근에 참조된 페이지가 계속 참조되며, 또 다른 경우에는 자주 참조되는 페이지가 계속 참조되는 경향이 있다. 즉, 응용에 의해 참조되는 메모리 페이지는 최근성과 참조 횟수 모두에 의해 가치가 결정되며, LRU나 LFU 정책 한 가지만으로는 페이지 교체 정책을 최적화하기 어렵다. 따라서 본 논문에서는 LRU 기법과 LFU 기법을 결합한 새로운 교체 기법을 제안한다. 제안한 기법에서는 페이지 리스트를 LRU 리스트와 LFU 리스트를 나누어 관리하는데, 이 두 리스트에서는 각각 최근성과 참조 횟수를 기반으로 페이지 리스트 순서가 유지된다. 과거에 자주 참조되었던 페이지가 LRU 정책에 의해 교체되어 빠져나가는 경우를 LFU 정책 병행 사용을 통해 줄임으로써, 최근성 가치에 의해 참조 횟수 가치가 훼손되는 경우를 줄인다. 트레이스-기반 시뮬레이션 결과, 제안 기법이 이전에 알려진 페이지 교체 기법보다 좋은 성능을 보일 때가 있음을 확인하였는데, 특히, 과거에 자주 참조했던 페이지를 일정 시간 경과한 후에 다시 참조하는 패턴을 보이는 응용들에서 제안 기법이 기존의 기법들보다 우수하다는 것을 알 수 있었다.

Keywords

References

  1. 이동희, 'LRFU 블록 교체 기법,' 서울대학교 컴퓨터공학과 박사학위 논문, 1998
  2. 조유근, 고건, 운영체제론, 홍릉과학출판사, 1990
  3. 최종무, 조성제, 노삼혁, 민상렬, 조유근, '적응력있는 블록 교체 기법을 위한 효율적인 버퍼 할당 정책,' 정보과학회논문지 : 시스템 및 이론, 제27권 제3호, 2000
  4. Bach, M.J., The Design of the Unix Operating System, Englewood Cliffs, N. J.: Prentice-Hall, 1986
  5. Denning, P.J., 'The Working Set Model for Program Behavior,' CACM, Vol.11, No.5, pp.323-333, May, 1968 https://doi.org/10.1145/363095.363141
  6. G. Glass, P. Cao, 'Adaptive Page Replacement Based on Memory Reference Behavior,' In Proceedings of the 1997 ACM SIGMETRICS Conference, pp.115-126, June, 1997 https://doi.org/10.1145/258612.258681
  7. Rusling, D.A., The Linux Kernel, Linux Documentation Project, 1999
  8. Silberschatz, A., Galvin, P., Operating System Concepts, Addison-Wesley, 1998
  9. Tanenbaum, A.S., Mordern Operating System, Englewood Cliffs, N. J., Prentice-Hall, 1992
  10. Y. Smaragdakis, S. Kaplan, and P. Wilson, 'EELRU : Simple and Effective Adaptive Page Replacement,' in SIGMETRICS '99 https://doi.org/10.1145/301453.301486