• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Hyper Threading

Can I say...Deep - Loaded question???


First off you have to understand a little about how software runs.

First off, there are 2 types of programs related to this...
1)Threaded, 2) NonThreaded.

A Nonthreaded program is the simplest. Its instructions run in order 1 at a time, until the program is completed. imagine a program does 5 tasks... A,B,C,D each of which has 7 steps. Somewhere in all the steps, programs have to get input, and give output also. I/O usually has waiting periods, associated with obtaining all the resources necessary to complete the operation.
First A runs to completion, then B, Then C, then D. ok?

Now a threaded application...A threaded application can do things in parrallel. Its sort of a pseudo-mode of doing multiple things at once. The program might do 2 steps of A, then when a stops to do I/O, B could do its first few steps, then when B has to stop, if a is ready again it could resume or if not, C or D could start. However still most processors still have to do 1 thing at a time...(ignoring pipelining and higher concepts)


Now what hyperthreading allows is 2 threads A & B could both be executing at the same time. How? Some of the more important parts of the cpu have been duplicated and now there exists 2 of them on the CPU, allowing it to execute 2 threads at the exact same time. This technology is known as hyperthreading, an early and primitive form of dual core processors. Note that with hyperthreading though, both halves of the cpu, must be working on the same memory space (2 threads of the same program). Eventually dual-core cpus will allow the computer to work in 2 separate memory spaces running threads in 2 separate programs at the same time.


Advantages: threaded programs run faster.
Disadvantages: not all programs are threaded, and although AMD cpus are not hyperthreaded, they run single threaded programs much faster than an intel cpu runs a single threaded program.


hope this helps.
 
Another disadvantage for you:

It looks like the stepping 9 CPUs are doing random bit flips when hyperthreading is enabled. There are a lot of BSODs out there because of this. No problems that I know of on the Stepping 7s
 
Just to clarify sao's excellent post. The two types of programs are called single-threaded and multi-threaded. All programs have at least one main thread. If the programmer can pull it off, he can choose to make part of the program execute a seperate thread for a task.

Think of a program like a person. Usually, you can only do one thing at a time, but sometimes you can do 2 things at the same time, like walk and chew gum. Or say you are eating, you may be able to chew while you bring the fork to your mouth, but sometimes only one thing is going on, just the chewing.

It is very hard to write programs that use a seperate thread for processing all the time. They are usually used for things like printing, otherwise the print job prevents the main thread from doing anything else. Threads are also used for spell checking, network listening, disk access, and a lot of other things. The reason hyperthreading is good, is that windows is a multithreaded OS. Every button on the screen requires individual attention. So while the OS is processing, other threads get processed at the same time increasing performance. Hyperthreading is absolutely useless in a single-threaded app, like a game.

I just think it's funny that we've reached the point that software now dictates the performance enchancements of hardware. I wonder if CPUs will eventially be like enginee, multiple cores instead of cylinders, and have hardware instructions to balance load and schedule threads built on die, that would be cool.
 
Originally posted by: tkotitan2
Just to clarify sao's excellent post. The two types of programs are called single-threaded and multi-threaded. All programs have at least one main thread. If the programmer can pull it off, he can choose to make part of the program execute a seperate thread for a task.

Think of a program like a person. Usually, you can only do one thing at a time, but sometimes you can do 2 things at the same time, like walk and chew gum. Or say you are eating, you may be able to chew while you bring the fork to your mouth, but sometimes only one thing is going on, just the chewing.

It is very hard to write programs that use a seperate thread for processing all the time. They are usually used for things like printing, otherwise the print job prevents the main thread from doing anything else. Threads are also used for spell checking, network listening, disk access, and a lot of other things. The reason hyperthreading is good, is that windows is a multithreaded OS. Every button on the screen requires individual attention. So while the OS is processing, other threads get processed at the same time increasing performance. Hyperthreading is absolutely useless in a single-threaded app, like a game.

I just think it's funny that we've reached the point that software now dictates the performance enchancements of hardware. I wonder if CPUs will eventially be like enginee, multiple cores instead of cylinders, and have hardware instructions to balance load and schedule threads built on die, that would be cool.

As far as I'm aware, software has *always* dictated the performance enhancements of hardware. From the first multi-cycle machines (where you had to schedule your assembly code so that a load doesn't cause a multiply to stall) to the first pipelined machines to the first SIMD machines, etc. It's all been a requirement of software to be well-optimized. Multithreading is yet another way in which programmers can enhance performance by telling the hardware more information and/or adjusting their code to fit the software better.

This doesn't seem like a trend that will end. The future looks to be what Sun calls "throughput computing" in which parallelism is gained by using multiple threads and each individual thread processing pipeline is simple, easy to design and low power.
 
Originally posted by: imgod2u
Originally posted by: tkotitan2
Just to clarify sao's excellent post. The two types of programs are called single-threaded and multi-threaded. All programs have at least one main thread. If the programmer can pull it off, he can choose to make part of the program execute a seperate thread for a task.

Think of a program like a person. Usually, you can only do one thing at a time, but sometimes you can do 2 things at the same time, like walk and chew gum. Or say you are eating, you may be able to chew while you bring the fork to your mouth, but sometimes only one thing is going on, just the chewing.

It is very hard to write programs that use a seperate thread for processing all the time. They are usually used for things like printing, otherwise the print job prevents the main thread from doing anything else. Threads are also used for spell checking, network listening, disk access, and a lot of other things. The reason hyperthreading is good, is that windows is a multithreaded OS. Every button on the screen requires individual attention. So while the OS is processing, other threads get processed at the same time increasing performance. Hyperthreading is absolutely useless in a single-threaded app, like a game.

I just think it's funny that we've reached the point that software now dictates the performance enchancements of hardware. I wonder if CPUs will eventially be like enginee, multiple cores instead of cylinders, and have hardware instructions to balance load and schedule threads built on die, that would be cool.

As far as I'm aware, software has *always* dictated the performance enhancements of hardware. From the first multi-cycle machines (where you had to schedule your assembly code so that a load doesn't cause a multiply to stall) to the first pipelined machines to the first SIMD machines, etc. It's all been a requirement of software to be well-optimized. Multithreading is yet another way in which programmers can enhance performance by telling the hardware more information and/or adjusting their code to fit the software better.

This doesn't seem like a trend that will end. The future looks to be what Sun calls "throughput computing" in which parallelism is gained by using multiple threads and each individual thread processing pipeline is simple, easy to design and low power.


While what you say is absolutely true, I didn't mean assembler when I mean software. I usually mean C or higher. All I'm saying is we have a hardware feature that benefits high-level programming, which seems odd. Heck, hyperthreading affects a Java programmers greatly now, if we want to take advantage of it. Multi-threading is a high-level programming concept, and I think it is just interesting. I think it's a sign of the paradigm shift that is taking place, more about intergration and less about Ghz. And Sun's not the only one working on it, most chip makers have realized paralellism is the future. Ultimately, we software engineers will hope to drive requirements down into the assembler of multicore chips, because writing multithreaded is hard. It would be nice if a chip came out with a new (or extended) ISA that was "threaded" on the assembler level (to take advantage of paralellism) so we software guys wouldn't have to try to make everything multithreaded. Otherwise, parallel computing should be a full CS course in colleges within the next decade. In any case, it's exciting to watch and see what happens!
 
Hyperthreading does have some benefits to single-threaded (conventional programs).

On a typical windows system there will be anything from 20 - 100 threads running, depending on what services and drivers are loaded.

Hyper-threading allows (almost) any 2 threads to run simultaneously. So a single-threaded program could run, and at the same time Windows could be doing it's house keeping, or Winamp could be decoding an MP3, or a CD could be burning.

Hyperthreading doesn't double the speed of the processor, instead it provides a small boost, by allowing more efficient use of the CPU.

The P4 is a 'super-scalar' CPU which means it can do work on than 1 instruction at a time. There are 2 or 3 seperate circuits which can be used for certain operations. Previous generations of CPU have tried to keep all these circuits busy by analysing the program that is currently running - trying to work out which bits can be done simultaneously, and which bits have to wait. Despite very sophisticated techniques, parts of the CPU were still sitting idle a lot of the time - hyper threading allows those spare bits of CPU to do some work on a 2nd thread (it need not be from the same program).
 
There are still some bugs to work out of the technology. There are some synchronization, semaphore and other problems happening. Some things are meant to be run sequentially, not simultaneously.

It's not really at all like a multiprocessor / multithreaded process at all. You can't run two threads on it simultaneously. You can just make more efficient use of idle integer and FP units. The benefits would be realized better on a processor larger than the P4 or Xeon.
 
I'm new aroud here and don't know if this is looked down upon, but I think this is a good link that describes Hyperthreading, as well as Multithreading and Superthreading.
 
Originally posted by: sao123
Can I say...Deep - Loaded question???


First off you have to understand a little about how software runs.

First off, there are 2 types of programs related to this...
1)Threaded, 2) NonThreaded.

A Nonthreaded program is the simplest. Its instructions run in order 1 at a time, until the program is completed. imagine a program does 5 tasks... A,B,C,D each of which has 7 steps. Somewhere in all the steps, programs have to get input, and give output also. I/O usually has waiting periods, associated with obtaining all the resources necessary to complete the operation.
First A runs to completion, then B, Then C, then D. ok?

Now a threaded application...A threaded application can do things in parrallel. Its sort of a pseudo-mode of doing multiple things at once. The program might do 2 steps of A, then when a stops to do I/O, B could do its first few steps, then when B has to stop, if a is ready again it could resume or if not, C or D could start. However still most processors still have to do 1 thing at a time...(ignoring pipelining and higher concepts)


Now what hyperthreading allows is 2 threads A & B could both be executing at the same time. How? Some of the more important parts of the cpu have been duplicated and now there exists 2 of them on the CPU, allowing it to execute 2 threads at the exact same time. This technology is known as hyperthreading, an early and primitive form of dual core processors. Note that with hyperthreading though, both halves of the cpu, must be working on the same memory space (2 threads of the same program). Eventually dual-core cpus will allow the computer to work in 2 separate memory spaces running threads in 2 separate programs at the same time.


Advantages: threaded programs run faster.
Disadvantages: not all programs are threaded, and although AMD cpus are not hyperthreaded, they run single threaded programs much faster than an intel cpu runs a single threaded program.


hope this helps.

Actually, in a superscalar CPU most of the functional units in the CPU are already duplicated. Hyperthreading basically sees which of those functional units are free when one thread is running, and runs instructions from the second thread in those units. Also, I would disagree that hyperthreading is a primitive form of dual core. A hyperthreaded CPU is actually more complex than a dual core CPU in its design. If you have a single CPU, it will be easier to make it a dual core CPU than it would be to make it hyperthreaded. Alpha has been working on hyperthreading (SMT) for a very long time in the 21464.
Basically the industry is moving towards more simple replicated units like dual core instead of a single more complicated unit like hyperthreaded CPU due to the complexity of design getting out of hand.
 
Originally posted by: Smilin
There are still some bugs to work out of the technology. There are some synchronization, semaphore and other problems happening. Some things are meant to be run sequentially, not simultaneously.
This has nothing to do with HT, and everything to do with the software application.

It's not really at all like a multiprocessor / multithreaded process at all. You can't run two threads on it simultaneously. You can just make more efficient use of idle integer and FP units. The benefits would be realized better on a processor larger than the P4 or Xeon.
You can run two threads simultaneously on the HT P4; instructions from two threads can be found in the pipeline at any given time.
 
What happens when/if Intel goes to a shorter pipeline approach like the Mobile line of processors (and AMD for that matter). Will Hyperthreading still be an option on the shorter pipelines? I would think it should be. Can you imagine a dual core Prescott running as 2 physical processors and 2 virtual processors for a total of 4. How would/will Microsoft handle their licensing of XP Pro (which only allows 2 processors). LOL
 
Originally posted by: michaelpatrick33
What happens when/if Intel goes to a shorter pipeline approach like the Mobile line of processors (and AMD for that matter). Will Hyperthreading still be an option on the shorter pipelines? I would think it should be.

This link mentions this specifically:
Sander Olson met with Intel folks at an Intel/PC Magazine-sponsored "Technology for Business Today" conference and picked up some rather interesting, if not confusing tidbits. First, Sander says that Intel believes that the Pentium M's pipeline is too short for HyperThreading, and as a result, the company still expects Prescott to be the desktop CPU of choice through 2005.

Can you imagine a dual core Prescott running as 2 physical processors and 2 virtual processors for a total of 4. How would/will Microsoft handle their licensing of XP Pro (which only allows 2 processors). LOL

XP home, which can only use 1 processor, can use HT enabled CPUs just fine. So I'm guessing it will work out ok for everyone. 🙂
 
Originally posted by: michaelpatrick33
What happens when/if Intel goes to a shorter pipeline approach like the Mobile line of processors (and AMD for that matter). Will Hyperthreading still be an option on the shorter pipelines? I would think it should be. Can you imagine a dual core Prescott running as 2 physical processors and 2 virtual processors for a total of 4. How would/will Microsoft handle their licensing of XP Pro (which only allows 2 processors). LOL

Same as if you ran a dual Xeon with HT (as I do), XP is licensed on physical cpu's. We should see that change for Longhorn as MS is recommending dual core CPU's for it (so Longhorn home, I suspect, will allow a dual core with HT to show up as 4)

Bill
 
Back
Top