Posted by Max Baun on Fri, Aug 22, 2008 @ 02:33 PM
So you’re sitting at your desk to doing some work. You are
just about to sign a contract, but there is no pen on your desk. Remembering
that the company keeps all the pens 3 floors down in the warehouse, you jump up
to go get one. Finally, you arrive back at your desk with a pen, sign the
contract and return the pen to the warehouse. Ten minutes later, another
contract comes in and you need the pen again. Now you have to go back down 3
flights of stairs, get the pen, and bring it back to your desk. I get tired of
people explaining how computers work with all the technical terms, so I will
continue to use this office situation throughout this explanation.
Essentially, this is how a computer works between the guy
working at the desk (the CPU) and the warehouse (RAM) where your necessities
are stored. Unfortunately, the design of a computer does not allow the RAM to
be right next to the CPU. When the CPU must perform a task, a signal has to
travel from the CPU to the RAM, locate the desired action or information stored
in a
memory location, and bring it back to the CPU where it is processed. Wouldn’t
it be nice to have a storage place right on the desk to keep pens?
Cache is a small memory system built right on CPU to
eliminate the need to travel to the RAM for frequently used processes or
information. Cache is a very small size and does not hold large files. A small
and frequently used process like adding two numbers is a task that can be
stored on the cache. In our office example, something like a pen could be
stored on our desk (cache) because of its small size and frequent use.
Sometimes your desk just gets too cluttered and you need to
clean it off. This occasionally needs to be done with cache memory. Filling up
your cache slows y
our computer down and makes it so the CPU has to travel all
the way back to the RAM again. If your desk is filled up, you can’t really find
anything and you have to go back to the warehouse to get another pen.
You may be asking why the cache doesn’t just store all of
the information of the computer so RAM is not needed, right? The reason is that
cache is very expensive. In other words, we use the small amount of cache to
speed up the larger amount of RAM. In other words it is much cheaper to use a
warehouse for storage than buying desks to fit everything in your warehouse.