Thread: Hyperthreading

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    4

    Hyperthreading

    hi there,

    I have a question, when hyperthreading capability makes your cpu two cpus, then when I start a task like unzipping something, it is only ONE cpu still, right? i mean otherwise it would take twice as long ;-). what I mean is, hyperthreading makes your cpu only then "virtually" two, when you really need two, no?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    There are times when a CPU is running code and doesnt run to it's full potential (a few more instructions could theorectically be read in amount of time a thread has on a timeslice). What Hyperthreading does (AFAIK) is it allows other threads to take advantage of this "lazytime". This acts like 2 threads being excuted at the same time - not usually possible without 2 processors.

  3. #3
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Hyperthreading is Intel's copyrighted term for Symmetric Multi Threading (there's something you can Google for and get good information). Symmetric multithreading is different than symmetric multiprocessing (multiple processors) for several reasons:

    1. It's one processor that can process multiple threads at once, not actually two processors.

    2. Since it's one processor, the two (or more) threads running share certain registers, L1 and L2 cache availability, etc.

    3. Because they must share, there can be contention between the two parallel threads and so they must be scheduled (by the OS and by the processor prefetch logic) in an efficient manner.

    Intel's hyperthreading has nothing to do with LONG pipelines, it instead has everything to do with multiple execution units in the processor itself. The P4 chips have seperate FPU, Integer, SSE, and SSE2 execution engines inside the core. Before Intel started using HT, only one of those execution engines could run at a time.

    Thus, if an FPU instruction came through the pipes, the integer, SSE and SSE2 units were all inactive and just sat there waiting. With Intel's Hyperthreading, they now can allow two of those execution engines to run simultaneously. That doesn't DOUBLE your output, but it does increase it by a noticeable amount if you have unlike instructions that can be run parallel.

    So for example, if you have multiple FPU instructions all streamed together, HT isn't going to help at all. If you have a mix of FPU, Integer and SSE that all needs to compute and the instructions are not dependant on eachother, they can be processed in parallel and can rip through them faster.

    The absolute best case scenario is something like a 65% increase in processing ability because of cache coherency and branch prediction issues (so it never can actually double). Many multithreaded apps can see a 15-30% increase, basically all others see an average of zero

    There are several older applications that will slow down when hyperthreading is enabled, mostly old multithreaded apps that were never actually meant to run in an SMT environment. These apps break off worker threads that are all interdependant of eachother, and often that scenario can make a Hyperthreaded processor stall out even worse than a normal processor would.

    These apps are few and far between, and an SMT-aware operating system (Windows XP) can be forced to limit those threads to a single virtual processor in order to keep them from misbehaving and slowing down.

    Both AMD and IBM are reportedly looking at SMT options as well, because most modern microprocessors have multiple execution engines that are (quite often) idling. Again, it has nothing to do with total pipeline length, it has only to do with the total number of seperate execution engines on the CPU core.

  4. #4
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Last edited by golfinguy4; 04-28-2004 at 05:27 PM.

  5. #5
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    crap i did forget the "", o well.

  6. #6
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    yea, that's it.

  7. #7
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    ROFLMAO @ RoD

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  8. #8
    Registered User
    Join Date
    Apr 2004
    Posts
    4
    thanks a lot

  9. #9
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536
    In case you were curious who patented HyperThreading the answer is... AMD

    Patent number 5,944,816,

  10. #10
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    AMD++;

    i used to be an intel fanboy, then i got an amd.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Disable hyperthreading no bios setting
    By *ClownPimp* in forum Tech Board
    Replies: 1
    Last Post: 01-18-2007, 04:01 PM
  2. taking advantage of hyperthreading?
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-21-2006, 11:49 PM
  3. Hyperthreading
    By Waldo2k2 in forum Tech Board
    Replies: 9
    Last Post: 12-08-2003, 04:05 PM