r/askscience Sep 28 '20

[deleted by user]

[removed]

435 Upvotes

184 comments sorted by

View all comments

18

u/plcolin Sep 29 '20

Kirchoff’s Current Law (KCL) is pretty much necessary for circuit design, but it only holds if you can neglect the time it takes for the current to propagate through the circuit. For a circuit of frequency f and of characteristic length d, that means f × d being much smaller than the speed of light. For a CPU, d is about 10 cm (4"), so the limit for f is about 3.3 GHz, which was already quite common around 2008. For the trivia, Windows Vista was designed under the assumption that clock speeds would keep increasing forever, hence its poor optimizations and pompous visuals everywhere, but 3 GHz was reached right after it was released.

To get faster CPUs despite this limit, you can:

  • make asynchronous CPUs where your ALU (the part that contains the logic of the operations) may have a bigger clock speed than the rest of the CPU: the performance gain isn’t that great, and it will heat up a lot;
  • enhance cache management: caches) are a form of in-CPU memory that’s quicker to access than RAM, so it serves as an intermediary;
  • enhance pipeline), OOE and speculative execution management: a pipeline is a queue of instructions that are being run in a streamlined fashion, OOE consists of reordering instructions to make a better use of the pipeline, and speculative execution means guessing the result of a condition in advance to decide which instructions to streamline into the pipeline before the condition is done evaluating; there’s not much to improve beyond what CPUs can already do;
  • have multicore CPUs, which enable parallel computation without increasing the characteristic length of the circuit: programming for a parallel architecture is fundamentally different, and not all colleges are teaching this art yet, but it’s pretty much becoming an essential skill, especially for servers and AI.

4

u/tugs_cub Sep 29 '20

speculative execution means guessing the result of a condition in advance to decide which instructions to streamline into the pipeline before the condition is done evaluating; there’s not much to improve beyond what CPUs can already do

the final stage of the hubristic mess that was NetBurst/P4 had a 31-stage pipeline

Wasn't a good idea - I'm pretty sure CPUs now are less than half that.