What is Hyperthreading?

3

Ars Technica: Introduction to Multithreading, Superthreading and Hyperthreading and “Tom’s Hardware”:http://www6.tomshardware.com/cpu/20021227/. _Well, the Intel site was confusing on the topic of what is this hyperthreading thing, so a quick google search found an article that someone with a 30 year old computer science degree like me can understand_
The basic idea is that today’s modern processors have two very different problems from the old days. Today, memory is incredibly slow (10-20 clock cycles, compared to 2-3 when I did computer systems design). So, if a thread has to access memory it is stalled essentially forever.
Second is that there are very long deep pipelines in today’s processors (so you might have 7 different pipelines that can execute and each is 6 stages deep). That means that if a thread stalls, then you lose lots of performance. You have to empty this gigantic pipeline to get to the next instruction. That’s a big change from the old days of say 2 pipelines and 3 stages in each.
Thus, what hyperthreading does is to make scheduling much more granular. If a thread blocks on a memory access, you can throw all kinds of other threads into the unused parts of the pipeline.
In effect what happens is that a single CPU (which is of course today really, a very parallel thing, it has lots of schedulers, lots of pipelines and lots of stages in the pipelines) becomes logically two CPUs to the operating system. There are some things to be duplicated, but essentially, to the software it looks like you can be in two entirely different contexts every single cycle.
Tom’s Hardware provides a higher level view BTW and points out that this matters the most when you are running at full bore applications with lots of threads (that is lots of parallelism). Not true with things like Office applications though.

3 Replies to “What is Hyperthreading?”

Comments are closed.

© All Right Reserved