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.
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.
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.
This has nothing to do with HT, and everything to do with the software application.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.
You can run two threads simultaneously on the HT P4; instructions from two threads can be found in the pipeline at any given time.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.
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.
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
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