Linked by David Adams on Wed 4th Aug 2010 18:28 UTC, submitted by estherschindler
Hardware, Embedded Systems Anyone contemplating a new computer purchase (for personal use or business) is confronted with new (and confusing) hardware choices. Intel and AMD have done their best to differentiate the x86 architecture as much as possible while retaining compatibility between the two CPUs, but the differences between the two are growing. One key differentiator is hyperthreading; Intel does it, AMD does not. This article explains what that really means, with particular attention to the way different server OSes take advantage (or don't). Plenty of meaty tech stuff.
Thread beginning with comment 435421
To read all comments associated with this story, please click here.
Comment by another_sam
by another_sam on Wed 4th Aug 2010 19:52 UTC
another_sam
Member since:
2009-08-19

"At some point, the pipeline may stall. It has to wait for data, or for another hardware component in the computer, whatever. We’re not talking about a hung application; this is a delay of a few milliseconds while data is fetched from RAM. Still, other threads have to wait in a non-hyperthreaded pipeline, so it looks like:
thread1— thread1— (delay)— thread1—- thread2— (delay)— thread2— thread3— thread3— thread3—"

I don't get a clear picture of this added to what they told me about OS scheduling at college. I remember that was something like "when waiting for resources, the process is kicked from the CPU and put in the 'Blocked' list". See this beauty:
http://en.wikipedia.org/wiki/File:Process_states.svg

Now, according to the article, Hyperthreading is an invention for dumb OSes who are not able to put blocked processes into a 'Blocked list' out of the CPU or what?

Reply Score: 3

RE: Comment by another_sam
by Brendan on Wed 4th Aug 2010 20:22 in reply to "Comment by another_sam"
Brendan Member since:
2005-11-16

Hi,

"At some point, the pipeline may stall. It has to wait for data, or for another hardware component in the computer, whatever. We’re not talking about a hung application; this is a delay of a few milliseconds while data is fetched from RAM. Still, other threads have to wait in a non-hyperthreaded pipeline, so it looks like:
thread1— thread1— (delay)— thread1—- thread2— (delay)— thread2— thread3— thread3— thread3—"

I don't get a clear picture of this added to what they told me about OS scheduling at college.


That's because the article uses confusing terminology (I'm seriously wondering if the article's author knows the difference between hyper-threading in hardware and multi-threading in software). It's also a little misleading ("a few milliseconds while data is fetched from RAM" only makes sense if your RAM is *insanely* slow).

A (hopefully) better explanation might be:

If a core is pretending to be 2 logical CPUs; then if the core can't execute instructions from one logical CPU (e.g. because data needs to be fetched from RAM) then it can still execute instructions from the other logical CPU, and the core doesn't have to just sit there doing nothing...

-Brendan

Reply Parent Score: 2

RE[2]: Comment by another_sam
by Tuishimi on Wed 4th Aug 2010 21:32 in reply to "RE: Comment by another_sam"
Tuishimi Member since:
2005-07-06

But from what I read, and I am probably very wrong, it sounds like the virtualization going on uses two parts of the physical CPU for differing instruction sets, but wouldn't they both need to be utilized in a clock cycle?

:/ This is why I didn't to EE and did CS instead. ;)

Reply Parent Score: 2

RE: Comment by another_sam
by bebop on Thu 5th Aug 2010 18:50 in reply to "Comment by another_sam"
bebop Member since:
2009-05-12

They are talking about the processor pipeline. On a very high level, in RISC machines lets say each operation takes five cycles to complete. However one part of the cycle needs something from memory, in this case the operation cannot continue because it does not have any data. This causes a delay in the execution of the instruction. This is a level below the operating systems thread scheduler, as its the actual cpu(s) making choices on what operations are to be done.

Reply Parent Score: 1