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