프로세서가 짧은 시간 동안 동일한 메모리 위치 세트에 반복적으로 액세스하는 경향을 말한다.
메모리 지역성은 두 가지로 분류된다.
- 시간 지역성
프로세서의 의해 최근에 액세스 되었던 기억 장치의 공간을 이후에 다시 액세스할 확률이 높다는 것을 의미한다.
- 공간 지역성
특정 저장 위치가 특정 시간에 참조되면 가까운 미래에 가까운 메모리 위차가 참조될 가능성이 높다는 것을 말한다.
캐시 메모리와의 관계
캐시(Cache)는 메인 메모리와 CPU 간의 데이터 속도 향상을 위한 중간 버퍼 역할을 하는 CPU 내 또는 외에 존재하는 메모리를 말한다.
캐시에 있는 데이터가 주 메모리에서 공간적으로 가까울 필요는 없지만 데이터 요소를 가져올 때 한 번에 한 캐시 라인으로 가져온다. 이는 공간적 지역성이 중요하다는 것을 의미하며, 시간적 지역성으로도 가장 낮은 수준에서 역할을 수행한다. 참조된 결과가 매우 밀접하면 레지스터에 보관될 수 있기 때문이다.
참고 문헌
https://www.tutorialspoint.com/what-is-the-locality-of-reference
What is the locality of reference?
What is the locality of reference - Locality of reference refers to the tendency of the computer program to access the same set of memory locations for a particular time period. The property of Locality of Reference is mainly shown by loops and subroutine
www.tutorialspoint.com
https://en.wikipedia.org/wiki/Locality_of_reference
Locality of reference - Wikipedia
From Wikipedia, the free encyclopedia Tendency of a processor to access nearby memory locations in space or time In computer science, locality of reference, also known as the principle of locality,[1] is the tendency of a processor to access the same set o
en.wikipedia.org
https://twojun-space.tistory.com/62
https://jwprogramming.tistory.com/18