Maximum PC

Understand­ing Processors

-

But what does all that mean? How do processors work? That’s what we’re going to attempt to cover in brief here.

Now, before we get into AMD’s answer to Intel’s Hyper-Threading, we need to understand exactly how calculatio­ns and data are processed via the CPU. Generally speaking, software asks a series of complex questions, one at a time, (known as the program order), which traditiona­lly the processor then calculates, one after the other in serial. However, because processors calculate problems far faster than they can draw data from DDR, SSDs, or hard drives, this can lead to delays, as data strings may not always be located on the processor’s cache, but somewhere else in the system.

Traditiona­lly, it would go something like this: Calculatio­n A provides answer B, which is used in calculatio­n C, with data D drawn from DRAM, after which calculatio­n E occurs. However, because we’re waiting on data D, we’re essentiall­y stalling the unit, by not utilizing those execution units at 100-percent load.

Out-of-order execution (OoOE) looks to rectify this by determinin­g which instructio­ns require data that’s stored in memory, establishi­ng how long it will take to retrieve said data, then reordering the instructio­ns so that instead of running in the original program order, it runs dependent on the availabili­ty of data. So, in our

scenario, it would go like this: Calculatio­n E is first, followed by calculatio­n A, followed by calculatio­n C, and by the time calculatio­n C begins, hopefully enough clock cycles have passed for the processor to draw that absent data into the registers from the DRAM. The calculatio­ns that have been processed prior to the arrival of data D are held in what’s known as a retire queue, and once the final calculatio­n has been completed, are then reordered and output back to the program via the processor.

Branch prediction is the next step up from OoOE. This looks at each branch in a program’s code, analyzes it, then tries to predict which unit each branch of instructio­ns should be placed into.

 ??  ??

Newspapers in English

Newspapers from United States