
Many probably remember how fast the microprocessor clock frequency increased in the 90s and early 2000s. Dozens of megahertz rapidly grew into hundreds, hundreds of megahertz almost instantly gave way to solid gigahertz, then gigahertz with shares, two gigahertz, etc.
But the past few years, the frequency is not growing so fast. From a dozen gigahertz, we are now almost as far as 5 years ago. So where did the old tempo disappear? What prevents, as before, to “chisel” the frequency up?
The text below is intended for people who are unfamiliar or not well acquainted with the microprocessor architecture. For savvy readers, appropriate posts are recommended yurav"Hot" gigahertz
There is an opinion that a further increase in the clock frequency is necessarily associated with an increase in heat generation. That is, it seems, nothing prevents just turning in the right direction a certain “switch”, which is responsible for increasing the frequency, and the frequency will go up. But the processor will heat up so much that it will melt.
')
This view is supported by many people who have something to do with computer technology. In addition, it is confirmed by the success of
overclockers who overclock processors
two or more times . The main thing - to put the cooling system more powerful.
Although the mentioned “switch” and the associated problem of heat generation do exist, this is only part of the battle for gigahertz ...
Main brake
Different microprocessor architectures can have different overclocking difficulties. For definiteness, we will talk here about
superscalar architectures . These include, for example, the x86 architecture - the most popular among Intel's developments.
To understand the problems associated with the rise of the clock frequency, you must first determine what rests its growth. At different levels of consideration of the architecture, various sets of parameters limiting frequency can be distinguished. However, it turns out that there is a level where there is only
one such parameter. That is, you can select only one brake, which must be additionally restarted each time when you want to accelerate.
Conveyor
The main brake lies at the level of the conveyor. Conveyor is the heart of superscalar architecture. Its essence lies in the fact that the execution of each instruction of the microprocessor is divided into stages (see figure).

The stages follow each other in time, and each of them is executed on a separate computing device.
As soon as the execution of a certain stage is completed, the released computing device can be used to perform a similar stage, but a different instruction.

The figure shows how in the period of time t1 the first stage of the first instruction is executed on the first computing device. By the beginning of period t2, the first stage has already been completed, and therefore it is possible to proceed to the execution of the second stage on the second device. In this case, the first device is released, and it can be given under the first stage of a different instruction. And so on. During the time period t4, various stages of the
four instructions will be executed simultaneously on the conveyor.
But what does all this have to do with frequency? It turns out that the most immediate. In fact, the different stages may differ in the duration of the performance. At the same time, different stages of the same instruction are executed in separate cycles. The duration of the cycle (and with it the frequency) of the microprocessor must be such that the longest stage fits into it. In the figure below, stage 3 is the longest.

Doing tact in short of the longest stage does not make sense. Technically, this is possible, but will not lead to a real acceleration of the microprocessor.
Suppose that the longest stage requires 500ps (picoseconds) of time to execute. This is the duration of a clock in a 2GHz machine. Suppose now that we want to make a clock two times shorter - 250 ps. Just like that ... We're not going to change anything except frequency. Such a move will only lead to the fact that the problematic stage will be executed two cycles, but in time it will be all the same 500ps. In addition, the design complexity will increase significantly and the processor's heat dissipation will increase.
One could argue that due to a shorter clock cycle, the short stages will begin to “fly by” faster, and this means that the average speed of calculations will increase. However, this is not the case (see figure).

At first, calculations will indeed go faster. But already from the fourth measure, the third stage and any following it (in our example, only the fourth) will begin to linger. This will happen due to the fact that the third computing device will be released not every clock cycle, but every two clock cycles. While it is occupied by the third stage of one instruction, the analogous stage of another instruction cannot be executed. Thus, our hypothetical processor with a clock length of 250 ps will effectively work as a processor with a clock of 500 ps, ​​although formally its frequency will be twice as high.
The smaller the better
So, from the point of view of the pipeline, the clock frequency can be increased only in one way - by reducing the duration of the longest stage. If it is possible to shorten the longest stage, it is possible to reduce the beat to the size of the stage that will be the longest after the contraction. And the shorter the beat, the higher the frequency.
As part of modern technology, there are not many ways in which the size of a stage can be affected.
One of such ways is the transition to a more perfect technological process. Roughly speaking, another decrease in the number of nanometers. The smaller the component parts of the processor, the faster it works. This happens due to the fact that the distances are reduced, which need to be overcome by electrical impulses, the switching time of transistors is shortened, etc. Simplifiedly, we can assume that everything is evenly accelerated. The duration of all stages, including the longest, is approximately uniformly reduced. The frequency can then be raised.
It sounds pretty simple, but going down the nanometer scale is a very difficult process. It very much depends on the modern level of technology, and it’s impossible to step further than this level allows. Nevertheless, manufacturers of microprocessors are constantly improving the technological process, and the frequency due to this gradually creeps up.
Cut patient
Another way to raise the frequency is to “cut” the most problematic stage into smaller ones. After all, once the instructions have already managed to shallow the stage. And it was possible many times. Why not continue cutting? The processor will only work faster after this!
Will be. However, it is very difficult to cut.
We give an analogy with the construction of houses. Houses are built floor by floor. Let the floor be an analogy of instruction. We want to break the construction of the floor into stages. To begin with, let it be two stages: the actual construction and finishing. While there is finishing on the last built floor, nothing prevents to start the construction of a new floor. The main thing is that the construction and decoration involved two different teams. It seems all is well.
Now we want to go further and crush the two stages already existing. Finishing, for example, can be divided into sticking wallpaper and painting ceilings. There is no problem with this separation. After the painters painted one floor, they can go to the next, even if the previous one is still sticking wallpaper.
And what about the construction? Suppose we want to break a building into walling and flooring. Such a division can be made, but there will be no sense from it. Once walls have been erected on one floor, you cannot send a crew to build them on the next floor until there are no overlaps. Despite the fact that, formally, we managed to divide the construction into two stages, we were not able to completely take on separate brigades specializing in walls and ceilings. Only one of them will work at any time!
The same problem exists in microprocessors. There are stages that catch the instructions for each other. It is very difficult to crush such stages into smaller ones. This requires very serious changes in the processor architecture. Just as major changes are needed in construction in order to simultaneously build several floors of a single house.
Turn the switch
So we got to what overclockers do. They raise the voltage under which the processor operates. Due to this, transistors (the main elements that make up the processor) start to switch faster, and the lengths of all stages are more or less evenly reduced. There is an opportunity to raise the frequency.
Very simple! But there are big problems with heat generation. Simplified, the power allocated by the processor is described as follows:
P ~ C
dyn * V
2 * f
Here C
dyn is the dynamic capacity, V is the voltage, f is the frequency of the processor.
It doesn’t matter if you don’t know what dynamic capacity is. The main thing here is tension. It's squared! It looks awful ...
In fact, everything is worse. As I said, the voltage is needed to make the transistors work faster. The transistor is a kind of switch. In order to switch, he needs to accumulate a sufficient charge. The time of such accumulation is proportional to the current: the more it is, the faster the charge comes to the transistor. The current, in turn, is proportional to the voltage. Thus, the speed of the transistor is proportional to the voltage. Now let's pay attention to the fact that we can increase the processor frequency only in proportion to the increase in the transistor response speed. In summary, we have:
f ~ V and P ~ C
dyn * V
3With a linear increase in frequency, the heat will increase according to a cubic law! When the frequency is increased by 2 times, it will be necessary to remove 8 times more heat from the processor. Otherwise it will melt.
Obviously, this method of increasing the frequency is not very suitable for manufacturers of processors due to low energy efficiency, although it is used by overclocking accelerators.
And it's all?
And it's all. Or almost everything. Someone might remember that he managed to slightly increase the microprocessor clock frequency even without raising the voltage.
This is also possible, but to a very limited extent. Processors are designed by the manufacturer to operate in a wide range of external conditions (which affect the length of the stage), so they are made with some margin in frequency. For example, the longest stage may take not a whole processor clock cycle, but, say, 95% clock cycle. Hence the opportunity to slightly increase the frequency.
By the way, I in no way call anyone to engage in independent overclocking of the processors. All who do it, do it at your own peril and risk. Improper overclocking is dangerous not only for your processors, but also for you personally!
I also note that in addition to the above, there are other ways to influence the length of the stage. But they are much less significant than those presented here. For example, a change in temperature affects the operation of the electronics as a whole. However, serious effects are achieved only at very low temperatures.
In general, it turns out that it is very difficult to fight for an increase in the frequency ... Nevertheless, this battle is gradually being fought, and the frequency is slowly creeping up. In this case, sad because the process has slowed down, is not necessary. After all, there was such a thing as multi-core. And what, in essence, is the difference for us, did our computer work faster due to the fact that its frequency rose, or because the tasks began to be performed in parallel? Moreover, in the second case, we get additional features and greater flexibility ...