42 views
To use cache memory, main memory is divided into cache lines, typically $32$ or $64$ bytes long. An entire cache line is cached at once. What is the advantage of caching an entire line instead of a single byte or word at a time?

recategorized | 42 views

An entire blocks of data (cache line )is copied from memory to the cache because the principle of locality tells us that once a byte is accessed, it is very likely that a nearby data will be needed soon.

principal of locality of reference does not always hold..But USUALLY holds.

So, By taking the complete contiguous address as a cache block ,reduce the chance for Cache miss.. directly improve the CPU performance.
by (433 points)

Answer: An entire cache line is cached at once just to take advantage of the locality of reference since the memory access posses the principle of locality of reference. The locality of reference says if memory is accessed then the probability of accessing the nearby locations again is very high. So, by caching a complete cache line the probability of cache hit is increased.

by Boss (19.4k points)