Jump to content

So, now and then i struggle to fully understand processors, some people say a processor is better than other because of its clock speed", some other people say it's better to have a look to other things such as architecture, cache, cores and threads, and that clock speed isn't a measurement and haven't been one for ages.

 

So, listening to all of these opinions gives me more question than answers. For example, i have seen 3rd gen processors at 3.4 GHz clock speed perfoming better than a 1.7 GHz 9th gen one; but, on the other hand, i've seen 2.9 perfoming waaaay better than a 3.9 3rd gen processor, and that takes me to this absolute question:

 

¿What makes a processor better?

 

Today, i call to all of you who know about processors to share your wisdom about them to all of us non-processor average peasants on this simple thread.

Link to comment
https://linustechtips.com/topic/1347783-processor-wisdom-share-thread/
Share on other sites

Link to post
Share on other sites

Putting it as simply and accurately as I can:

The architecture and physical properties of the material limits the clock (propagation delay, skew, attenuation);

The architecture defines what instructions can be executed, in how many cycles, how different instructions can be processed in smaller steps of a pipeline, if they can be executed out-of-order, what can be speculated, how can intermediary results of instructions be forwarded to a subsequent instruction in the pipeline without finishing its execution, etc;

The clock indicates the speed the pipeline will be executed (fetch instruction from memory, decode to figure out what must be done and which data is used, get the operands from memory/register, do the operation, save the result to a register/memory);

The cache acts as an intermediate to the memory (which is very slow in comparison). Memory blocks get mapped to the different cache levels until the processor gets an updated copy. If the processor changes the value of a memory address, that change is saved on the cache and can be propagated later, when the block gets invalidated (e.g. from a request to replace the cached block with a different address range, or read by a different processor, and maybe DMA, but unsure on that last one).



Then came the different cores, usually sharing the L3 cache, which requires synchronization techniques to make sure changes made by processor A is seen by processor B if it tries to access the same cached memory address;

Threads are complicated. They are usually the same exact core. When the OS assigns a process to CPU thread, it basically identifies which process is linked to the next instructions that will feed the pipeline. When the process start executing, the instructions are feeded into the pipeline, which can run independently from the process, as the processor can speculate what should be executed next. The CPU then rapidly switches from one process to another, commiting instructions that were correctly speculated and re-executing stuff that were wrongly speculated.

The CPU can execute a ton of stuff in parallel due to a multitude of replicated execution units. e.g. in the image below you can see multiple ALUs (Arithmetic and Logic Units - which do integer and logical operations, along with multiple floating point multiplication/divide and add/sub units).

AMD Ryzen Architectural Deep-Dive - Ending The Intel Monopoly

 

What makes a processor better? Mitigating its bottlenecks.

They don't add a ton of additional execution units because the memory and caches couldn't feed them.

So much so AMD did the mess with shared floating units between two cores thinking it would be fine (Piledriver/excavator?)...
They don't add a ton of additional cache because its expensive and consumes a lot of power.
They don't increase memory bandwidth because it is expensive and consumes a lot of power.
They don't increase register files because speculation complexity grows exponentially and failing incurs in heavy penalty, so it isn't worth it.

You need to carefully balance all these things to get higher single-core performance.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×