0

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!

Joshua Light
  • 101
  • 5
  • I think its defenitely an interesting topic. But to me it is unclear what the (programming) problem is that you are trying to solve. Maybe elaborate on the "relate" what answer are you looking for? Performance? Optimization? Research? – H.Hasenack Jul 20 '20 at 21:55
  • Nothing special here, just trying to learn things. These two notions seem like they're related, but I didn't find any special literature that connects them together. The relationship is very important if it exists but if not I'd also like to capture that. – Joshua Light Jul 21 '20 at 12:35

1 Answers1

0

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).

Joshua Light
  • 101
  • 5