I recently read about processors(mainly multi-processor) and i came across, what is called as multi-level caches. I know that they have several cache in this case, for increasing the performance. But i could not figure out, how a additional cache increase performance in the processor? Is that increase the space instead?

Thanks for the reply and correct if Am wrong!

link|improve this question

feedback

3 Answers

up vote 5 down vote accepted

The use of multiple cache levels is partially a mechanism to coordinate multi-core processors and partially a compromise between price and performance.

In a processor with multiple cores, each core has its own L1 cache. This allows the core to read and write from and to the cache without worrying about interfering with other cores. The cores need shared storage, though, so that they can exchange certain information easily. The L2 cache is shared by all cores, so it's used as a sort of communal storage space where information is available for all threads.

The difference between the L2 and L3 caches is the compromise part. Caches are made of static RAM, or SRAM. This is different from the Dynamic RAM (DRAM) that makes up your main memory. Dynamic RAM needs to be "refreshed" periodically, that is, over time DRAM cells lose their value unless they are read and then re-written. Your memory controller does this automatically, but every time the memory controller has to do this (thousands of times a second) it is unable to read/write values for the processor until it is done. This slows down DRAM. SRAM does not have this limitation, SRAM will retain its value indefinitely as long as it has operating power, making it much faster. So, your caches (both L2 and L3) are made of SRAM. The trouble is that SRAM is very expensive; while 4GB of high-speed DRAM is a bit pricey but affordable, 4GB of SRAM is well beyond your price range.

So, whenever a processor manufacturer decides to add more SRAM to the design, it gets noticeably more expensive. SRAM comes in multiple speeds, and as you might expect faster SRAM is more expensive than slower SRAM. So, your processor's manufacturer has tried to optimize it for both speed and cost by using both a higher speed SRAM and a lower speed SRAM. The processor is then designed such that it will put the values it needs most in the faster cache (L2) and the information that it needs less in a slower cache (L3). By carefully managing this memory in the processor's microcode, this creates an even compromise: there is more cache, and some of the cache (hopefully the cache that the processor needs most) is very fast.

So, to sum it up, processors have multi-level caches in order to increase the capacity of the processor cache without also dramatically increasing the price of the processor. This careful mixture allows for processors that are faster and cheaper.

link|improve this answer
+1 very good explanation – Ant's Apr 11 '11 at 4:10
feedback

The closer caches are much smaller in size. Here's a bit about it, I can't find anything about speed but it's probably limited (it's pointless and costly to go over) to the processor or motherboard speed.

There are three levels of cpu cache (two in a single-core), RAM (secondary) and hard drives (tertiary).

link|improve this answer
feedback

processor's have multilevel cache like l1, l2 and l3.

L1 is the fastest cache but also most expensive. L2 comes at second and discussed most. And after that L3 which come after L2.

The faster the cache the faster the processor read the data from and write to it.

But companies have to make a choice between the performance and expenses of every processor so they introduce multilevel cache in processors according to their price.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.