Linked by David Adams on Wed 4th Aug 2010 18:28 UTC, submitted by estherschindler
Thread beginning with comment 435421
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
RE: Comment by another_sam
by Brendan on Wed 4th Aug 2010 20:22
in reply to "Comment by another_sam"
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.
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
RE[2]: Comment by another_sam
by Tuishimi on Wed 4th Aug 2010 21:32
in reply to "RE: Comment by another_sam"
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.






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?