Previous | Next --- Slide 48 of 87
Back to Lecture Thumbnails
ParallelPorcupine

With prefetching, the CPU predicts when a piece of data will be needed and places it into the caches before the data is used. This reduces stalls, and hides the latency of accessing the cache.

barracuda

As the slide suggests, predicting data access patterns can be difficult. Prefetching can also be used for instructions in addition to data, in which instructions that the CPU might soon use are fetched before execution. A variety of prefetching techniques can be used, ranging from simple sequential (next-line) prefetching to more sophisticated prediction-based methods using branch predictors.