-
Caching is very important for CPUs.
So what exactly is this cache?
A cache is a small piece of memory close to the CPU, which is fast but has a small capacity.
Why is there a cache?
In the earliest 386 era, the CPU did not have the concept of frequency doubling, and the frequency of the CPU and the memory were the same (in such an environment, the processor went directly to the memory to find the data.
Later, when it developed to 486, the CPU appeared to be multiplied. In this way, the frequency of the CPU is not the same as the frequency of the memory, and the frequency of the memory will lag far behind the frequency of the CPU, which is getting slower and slower.
This brings up a very serious problem:
The CPU calculates very quickly, and when it calculates, it has to find data, and the CPU is always fast when it is looking for data, and the CPU is always dragged down by slow memory. so that its performance can not be played.
At this time, the CPU designer came up with a very clever solution - since the CPU is not very slow to find memory data, then simply make a small piece that can be integrated into the CPU. This memory puts the most commonly used data directly into it, and then uses some smarter algorithms to take the data in advance through the memory if there is any data need. When you use it, you use it directly.
Only when the cache lookup fails, will the memory be found.
This allows L1 caching to be integrated inside the CPU.
Later, a L2 cache was integrated on the motherboard. Back in the Slot era, the L2 cache of the CPU was on both sides of the CPU, and the L2 cache worked at half the speed of the CPU main frequency.
With the development of technology, L2 caches have also been integrated into the CPU. Therefore, there is no such thing as "half-speed" in today's L2 caches, which are running at full speed at the frequency of the CPU.
So today's CPU is that there is a first-level cache and a second-level cache, and when the CPU is looking up data, the probability of memory being used is greatly reduced.
In this way, the effect and speed of CPU computing are improved a lot.
So what's the difference between a L1 cache and a L2 cache:
Level 1 cache is smaller, and it is closer to the CPU, so it has a higher chance of being looked.
The second-level cache is larger, and the farther away than the first-level cache, the less likely it is to be found.
Of course, there are also differences in the combination of each way, so I won't say more.
Having said all that, now you know what caching is, right?
-
It's the temporary storage inside the CPU.
-
The more L2 caches, the faster the CPU.
-
To put it simply, it is the place where the CPU is used to find data, and the data to the CPU is the hard disk in turn.
Memory. L2 caching.
-
L2 cache is also called L2
cache, which is some buffer memory inside the processor that acts just like memory.
-
To put it simply. Your factory is like a CPU
The production efficiency is high.
It is inconvenient to transport and transport.
It's a long way to go.
That's when you need to get an airplane.
Deliver to the city you want to deliver to as quickly as possible.
And then pull it with a car.
Finally, it is manually charged to you.
The speed can be imagined.
One is slower than the other.
-
The purpose of the L2 cache is to prevent the CPU from repeatedly reading data from memory (which may also continue to read data to the hard disk).
Many times, when our computer runs a program, the CPU needs to read the same data on the hard disk many times, in order to save the CPU from repeatedly taking data from the hard disk or memory, so set up a level 2 cache, you can temporarily store the data used by the CPU recently on this cache, if the CPU wants to read the data, first check whether there is this data on the cache, and then go to the memory or hard disk to retrieve it.
With the development of microprocessors, the hit rate of cache data is very high, so the size of the cache directly affects the performance of the CPU (if you compare the current CPU, the high-end U is generally larger than the low-end U cache), the level 1 cache capacity is smaller, but the speed is faster, the level 2 capacity is larger, the speed is slower than the level 1, but it is much faster than the memory and hard disk read speed.
The output of this program is: 4
You can standardize the program to make it easier to understand. >>>More
It depends on which language you are applying for, and if there is a question bank, you can do all the questions in the question bank at most.
National Computer Examination Level 1 First Half Registration End of December --- beginning of January. >>>More
I heard the teacher say that the second level of computer science seems to focus on C language programming, and it is difficult to learn by myself, and I don't understand what the teacher says, maybe it's my IQ problem.
Hello, the following are the registration conditions for the second-level constructor. >>>More