What is a processor cache and what is it for?

Who I am
Pau Monfort
Author and references

When you buy a computer, mobile phone, tablet or any electronic device consisting of a memory system and a CPU, we rarely pause to think about the importance of cache memory. Almost everyone cares a lot more about how many cores the processor has or how much capacity the RAM has.

RAM memory >>

We have to realize that each computer system has its own performances defined by the set of all its elements, i.e. the performance of the device.

For example, a computer that will be used as a workstation for programming tasks may be highly dependent on memory usage, but it will also depend on other elements of the system, albeit to a lesser extent.

All this is reported by the Amdahl law which says: the improvement obtained in the performance of a system due to the alteration of one of its components is limited by the fraction of time in which that component is used.

The law is defined by the formula:

That is, for example in a computer to perform programming tasks we have to depend on 70% of the memory time, 10% of the CPU and 20% of the input / output elements.

So far we have clear that a computer system does not depend only on the CPU or does not depend only on memory, but what is the importance of each element?

Each element is important a depending on the program we are running, there are those that require a large CPU usage and there are those that require a large memory usage. In general, although this is not always the case, the programs that require the most CPU are those related to calculations and the ones that use the most memory are the ones that continually access the memory system.

The operating system >>

Not everything depends on the CPU

We usually think that the more frequency our CPU has, the better it will work or the faster our device will be, but that's not the case at all. Until a few years ago, Moore's law was respected. Moore's law states that roughly every two years the number of transistors in an integrated circuit will double. This tells us that our device which has a CPU with twice the transistors should run twice as fast, and theoretically twice the power. If we look at this trend, it was met until 2003, when they started building a processor with several cores.

But ... we have a problem if we look at the following graph:

The speed of RAM and CPU have not evolved in the same way. The CPU has evolved in terms of frequency and the main memory in terms of density, by MBytes per inch. There is a formula that determines the influence of RAM on CPU speed:

Currently, engineers are no longer looking for ways to increase CPU frequency, but how to add more cores to a CPU, add replicated functional units, and thereby improve overall processor performance.

The computer processor >>

What kind of applications benefit from this memory?

The cache memory is capable of accelerating all types of applications. Being a system designed to avoid blockages, its advantages are not linear. That is, a six megabyte memory will not give you twice the benefits of one of three, but in certain situations it will get you out of trouble. In this case and as happens with the RAM memory size, the more we have the better.

Further Reading:

  • How To Wipe Cache And Cache Partition On Samsung Galaxy S10
  • How To Wipe Cache And Cache Partition On Samsung Galaxy S10 Plus
  • How To Wipe Cache And Cache Partition On Samsung Galaxy S10e
  • Qualcomm Snapdragon 8cx 5G, the first processor with 5G and 7nm for PC
  • Buying a new gaming pc: how to choose

add a comment of What is a processor cache and what is it for?
Comment sent successfully! We will review it in the next few hours.