In the 80s, the processor speed increased visually in comparison memory access times. Soon, it became clear that something had to be done to improve the speed at which PC memory could be accessed to make the system work properly, as the processor was too fast, if it could not immediately access the details. This discrepancy between the processor's speed and memory access times is what led to the creation cache memory.
What is cache memory?
This part, sometimes notable behind the number of processor cores and their speed, has been a milestone in computer history. At a low level, the cache is the fastest memory type It has a small set of instructions that the group always uses to perform its daily tasks. The group installs those commands in the cache using sophisticated algorithms so you can access them quickly, effectively and without any additional issues.
In other words, the cache is a type of memory in which the processor is direct, almost instantaneous, and where most of the information and instructions it uses are stored. so you & # 39; t have them "right away
Cache rates in a modern processor
We defined a "modern processor" because the original processors, when this kind of memory came into operation, did not act that way. Modern processors have multiple levels of cache, separated into L1, L2, L3 and even L4 in some cases (L comes from "level", level in English, so we're talking cache level 1, level 2, etc.).
- The L1 storage It is the fastest but the smallest. It contains data that the processor will need to perform basic tasks, though it has two purposes: commands and data. The first is the tasks that the processor should perform, and the second the information to be processed. The size of this cache is usually around 256 KB, although in some processor models it is already up to 1 MB. For example, the Intel Core i9-9900K has 512 KB of L1 cache.
- The L2 cache It is slightly smaller (but much faster) and larger than the L1. It usually has a capacity between 256 KB and 8 MB. For example, the Core i9-9900K has 2 MB of L2 cache.
- The C3 cache It is also smaller, smaller but larger than the previous one, with average capacity between 4 and 50 MB. The Core i9-9900K still has 16 MB of L3 cache, but it behaves differently than the previous one because it is shared among all processor cores.
How does the processor cache work?
To see how cache works, we should know that computers have three types of memory: on the other hand, there is a memory storage, which we found on hard drives and SSDs, represents a very large group space. On the other hand, we have RAM memory, or memory of random access, much faster but smaller than before. Finally we have the cache memory inside the processor itself, that is the fastest but also very little.
In theory, nowadays it is common to handle the capabilities of several terabytes when talking about slot machines, while talking about RAM, this number is reduced to a few gigabytes (nowadays it is more common to see 16 or 8 GB of RAM). The cache, meanwhile, is very small, and is actually measured in megabytes or kilobytes.
The way this kind of memory works is that, when the program starts, it starts issuing a series of commands that are in its own code and managed by the processor. The information is first loaded into RAM and then transferred to the processor, but in order to improve its operational efficiency, the most important and most commonly used commands are copied to the cache, so that the processor can access them quickly. And this improves performance
Cache usage sequence
We will see the performance of this data according to what we have just described: if the program is running on a PC, the information goes to RAM, from it to L3 text, then to L2 and finally L1. While the program is running, the processor will search for the information needed to process the processor in the immediate memory, L1 cache. If you can't find it there, you'll go to L2, then to L3, and if it's out of place, you'll want it in RAM.
This is why cache is so important, as is the case with access times. Imagine if every time a processor has to execute commands (and it releases thousands per second) it has to wait for nanoseconds, which is what it takes time to reach. The amount of this time, in the end, will decrease in major operating losses, and back to the beginning this was the exact problem they encountered in the 80s, and why the cache was created.
Table of Contents