Once we have located the line identied by the tag in

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ctions from memory. The CPU never overwrites or modifies these instructions. 6.2.3 Summary of Locality In this section we have introduced the fundamental idea of locality and we have identified some simple rules for qualitatively evaluating the locality in a program: ¯ ¯ Programs that repeatedly reference the same variables enjoy good temporal locality. For programs with stride- reference patterns, the smaller the stride the better the spatial locality. Programs with stride-1 reference patterns have good spatial locality. Programs that hop around memory with large strides have poor spatial locality. 298 CHAPTER 6. THE MEMORY HIERARCHY ¯ Loops have good temporal and spatial locality with respect to instruction fetches. The smaller the loop body and the greater the number of loop iterations, the better the locality. Later in this chapter, after we have learned about cache memories and how they work, we will show you how to quantify the idea of locality in terms of cache hits and misses. It will also become clear to...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online