Memory access granularity vs Cache line

1.2k views Asked by At

I'm trying to note the concept of memory access granularity, which I've found mentioned in some articles.

It's being said that memory access granularity is [1]:

the size in which a processor accesses memory

On the other hand, the cache line is [2]:

the unit of data transfer between cache and memory

  • How does the size of a cache line relate to the granularity of the memory?
  • Do they mean the same thing?

Thanks!

1

There are 1 answers

0
Joshua Light On

It seems like the memory access granularity is a more broad term and it can be applied to any kind of memory. Therefore, the cache line size is simply a granularity of the on-chip caches[1].

Quote from the link:

In most modern systems, the memory subsystem is managed and accessed at multiple different granularities at various resources. The software stack typically accesses data at a word granularity (typically 4 or 8 bytes). The on-chip caches store data at a cache line granularity (typically 64 bytes).