What is a cache? [Computer Hardware]

A cache is a storage location where a computer temporarily keeps information it just processed so that if it needs the same information again, it can be quickly accessed.

Caches make computers perform optimally because a computer would often need to access data it just processed and retrieving that data from secondary storage or ram is a lot slower than retrieving it from cache.

In hardware, a computer can be described as having L1 and L2 cache.

L1 cache is a portion of memory kept for the purpose of caching and is built into the microprocessor. This is very fast and has a cycle time of about 2 nanoseconds.

L2 cache is a portion of memory built into the motherboard for the purpose of caching. It is slower than the L1 cache but faster than the RAM. It has a cycle time of about 60 nanoseconds.

Modern computers can have up to L3 cache and it means they have two levels of caching built directly into the microprocessor, and one to the motherboard.

0 comments: