Abstract
Prefetching aims at reducing memory latency by fetching, in advance, data that are likely to be requested by the processor in a near future. The effectiveness of prefetching is determined by how accurate the prediction on the needed instructions and data is. Most previous studies on prefetching were limited to proposing a particular prefetch scheme and its performance evaluation, paying little attention to theoretical aspects of prefetching. This paper focuses on the theoretical aspects of instruction prefetching. For this purpose, we propose a clairvoyant prefetch model that makes use of perfect history information. Based on this theoretical model, we analyzed upper limits on the prefetch prediction accuracies of the SPEC benchmarks. The results show that the prefetch prediction accuracy is very high when there is no cache. However, as the size of the instruction cache increases, the prefetch prediction accuracy drops drastically. For example, in the case of the spice benchmark, the prefetch prediction accuracy drops from 53% to 39% when the cache size increases from 2Kbyte to 16Kbyte (assuming 16byte block size). These results indicate that as the cache size increases, most localities are captured by the cache and that instruction prefetching based on the information extracted from the references that missed in the cache suffers from prediction inaccuracies
선인출은 프로세서에 의해 사용될 데이타를 예측하여 미리 프로세서 근처에가져오므로써 메모리 지연 시간을 줄이는 기법이다. 선인출의 효율성은 미래에 사용될 데이타를 얼마나 정확하게 예측하는가(선인출 예측 정확도)에 따라 결정된다. 기존의 명령어 선인출에 관한 연구들은 특정 선인출 기법의 제안 및 성능 평가에 그치고 있어서 명령어 선인출의 특성이 체계적으로 분석 정리되지 못하고 있다. 이에 본 논문에서는 명령어 선인출의 예측 정확도에 대해서 이론적으로 분석하여 이의 한계를 알아보고자 한다. 그 방안으로 명령어 선인출 상한 모델이라는 이론적인 선인출 모델을 제안하고 이 모델을 기반으로 명령어 선인출에 대해 체계화된 분석을 한다. 특히 이러한 연구 결과로써 궁극적으로 시스템 성능을 효 과적으로 향상시킬 수 있는 효율적인 명령어 선인출을 가능하게 하는 데 그 목적이 있으므로 주로 명령어 선인출 효율성 측면에서 분석을 시도하였다. 이러한 선인출 모델을 이용하여 본 논문에서는 SPEC 벤치 마크 프로그램들의 명령어 선인출 예측 정확도의 한계를 이론적으로 분석하였다. 그 결과로 캐쉬가 없는 경우에는 선인출 정확도가 매우 높게 나타남을 보였다. 반면에 캐쉬가 있을 경우에는 캐쉬 크기가 커짐에 따라 선인출의 정확도가 급격히 떨어짐을 관찰하였다. 예를 들어 spice의 경우 플록크기가 16바이트이고 직접사상 캐쉬에서 캐쉬 크기가 2K 바이트와 16K 바이트일 때 이론적으로 가능한 최대 선인출 정확도가 각각 53%,39%로 크게 떨어지는 것을 관찰하였다. 캐쉬의 크기가 커질수록 선인출로 메모리 지연 시간을 줄일 수 있는 명령어 참조의 많은 부분을 캐쉬가 처리하게 되고 또한 캐쉬에서 접근 실패된 명령어 참조는 그 참조 행태가 불규칙하여 예측이 어렵기 때문에 일정 크기 이상의 명령어 캐쉬를 사용하는 경우 명령어 선인출을 사용하는 것은 전체 시스템 성능의 향상에 큰 도움이 되지 않음을 이론적으로 규명하였다.