0

I am understanding the concept of TLB (MMU). i am confusing if caches (like the TLB) are so great, why don’t we just make bigger caches and keep all of our data in them.

Sumit Gemini
  • 1,836
  • 1
  • 15
  • 19

1 Answers1

1

Simple: such caches are expensive. The reason why they are so helpful is: they are carefully "fine tuned". They are located "very close" to where they are required.

You might want to read about memory hierarchy to understand the balancing between cost and "speed" requirements.

GhostCat
  • 137,827
  • 25
  • 176
  • 248
  • 1
    Also, making caches bigger would slow them down, if you increased the size by a lot. [Why is the size of L1 cache smaller than that of the L2 cache in most of the processors?](https://stackoverflow.com/a/38549736) Even with an unlimited power budget, speed-of-light and gate delays in decoding complexity would probably stop you from building a 4GiB L1d cache that's as fast as a real-world 32k or 48k cache out of multi-ported SRAM. Although a huge L3 or L4 cache is at least plausible, just not worth it. (Except off-chip with eDRAM or HBM.) – Peter Cordes Jan 29 '22 at 05:28