CPU Cache + RAM :: Theoretical ?

Machuse

Distinguished
May 18, 2010
3
0
18,510
I am finishing my CS degree, and doing some review of material.

In terms of CPU Cache (L1,L2,L3); cache is only necessary because RAM clock cycles are too slow?
After review the wiki article and this article it seems there are two reasons for the cache; the other being that the time taken to retrieve/find memory grows as memory becomes larger (hence the different levels of cache).

In summation, if ram could run at the cpu clock speed, there wouldn't be a need for cache - other than latency with actually finding and returning memory.

It has always been explained to me as if cache was necessary, because it was physically faster than ram due to it being physically closer to the chip - as if it was transportation time that is the bottleneck...just not sure
 
Why is it necessary to do new research if you are claiming to be reviewing material? And why can't your instructors help you?

Anyway, I think I need help understanding what your questions are also. Please be specific.
 

Machuse

Distinguished
May 18, 2010
3
0
18,510
where did I talk about research?
and...my professor isn't available at 7am on Sunday.

Question: What is it about the cpu cache that makes it faster than ram.

thanks for taking a look at my question
 

sarwar_r87

Distinguished
Mar 28, 2008
837
0
19,060


cpu cache have lower latencies. making them faster. also o access the cache, cpu will just access them. to access the ram, it needs to go through memory controller.
 
Cache will always be needed because it takes longer to find stuff in larger memory. Technically ram is just the next level out of cache and serves as a large cache for stuff on the HDD. If you were to use RAM as a fully associative cache for the CPU then it work take a really long time to find what you are looking for if its one of the last lines checked. Cache is pretty good so a CPU rarely has to read to main memory, and if you can get all the data needed into a small L1 or L2 cache it takes much less time to find, not because the cache itself is smaller but because the memory address needs to get checked against each line which is what takes the most time.
 

TRENDING THREADS