2016년 5월 10일 화요일

리눅스 페이지 교체 정책에 대해


리눅스 커널 페이지 교체 정책에 대해

Linux 2.4 page replacement changes in detail

[중략]

Page aging

[중략]

However, in some situations the LFU page aging of Linux 2.0 is known to have too much CPU overhead and adjust to changes in system load too slowly. Furthermore, research has shown that recency of access is a more important criteria for page replacement than frequency.

These two problems are solved by doing exponential decline of the page age (divide by two instead of substracting a constant) whenever we find a page that wasn't accessed, resulting in page replacement which is closer to LRU than LFU. This reduces the CPU overhead of page aging drastically in some cases; however, no noticable change in swap behaviour has been observed.

정리하면,

LFU방식인 page aging (교재에 나온 방법)이 리눅스 2.0에서 사용되었으나, 이는 오버헤드가 컸고, 2.4에서는 exponential decline(age를 2로 나누어서 줄임)을 적용하였는데, 이는 LFU보다는 LRU에 더 가까운 방법으로 보인다.
즉, LFU와 LRU방식이 모두 섞여 있다고 보면 됨.

출처:

https://www.usenix.org/legacy/event/usenix01/freenix01/full_papers/riel/riel_html/