Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't RAM as fast as registers/cache memory? [closed]

Why do we need to cache in Cache Memory? Why cant RAM Memory be made as fast as register or Cache Memory or Cache be as large as RAM Memory (4GB) so that everything can be in cache? Any good article/books to understand these concepts?

like image 525
Andy Avatar asked Sep 23 '11 16:09

Andy


People also ask

Why is cache memory faster than RAM?

Cache memory, which also is a type of random access memory, does not need to be refreshed. It is built directly into the CPU to give the processor the fastest possible access to memory locations and provides nanosecond speed access time to frequently referenced instructions and data.

Why is RAM slower than registers?

RAM is farther away from the CPU than registers are, which can make it take longer to fetch data from it.

Why are registers faster than RAM?

Registers are essentially internal CPU memory. So accesses to registers are easier and quicker than any other kind of memory accesses. Save this answer.

Is RAM faster than cache memory?

Within the memory hierarchy, cache is closer and thus faster than RAM.


2 Answers

Faster stuff costs more per bit. So you have a descending chain of storage, from a few registers at one end, through several levels of cache, down to RAM. Each level is bigger and slower than the one before. And all the way at the bottom you have disk.

like image 177
Tom Zych Avatar answered Oct 01 '22 15:10

Tom Zych


Registers and cache are on the cpu chip itself, or tied to it very closely. Normal RAM is accessed through an address bus, and it often subject to a level of indirection by memory mapping.

like image 20
Paul Tomblin Avatar answered Oct 01 '22 13:10

Paul Tomblin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!