By Stephen Bucaro
Hyper-threading (HT) is a method that enables a processor to perform tasks faster. It's Intel's version of simultaneous multithreading (SMT). You can view a program as a stream of instructions, or a "thread". If you run two programs at the same time, you are "multithreading". A single program can also be designed to multithread.
Don't get multithreading confused with "multitasking". In multitasking the processor switches between tasks. It may appear that multiple programs are running simultaneously, but actually the processor is switching rapidly between prgram threads.
Don't get multithreading confused with "multiprocessing". In multiprocessing there are multiple central processing units (CPUs) within a single computer system. If you were to run two programs (or two threads) on a computer with dual processors, you have no need for HT because you could run each thread on a separate processor.
When you're running a program on a computer, every instruction does not involve the processor. Some instructions involve moving blocks of data from one memory location to another. Some instructions involve moving data to or from the buffer of a peripheral. Sometimes the processor is executing NOPS, in other words just waiting for more instructions.
HT involves using this time when one program's instruction does not involve the processor to run instructions from another program or thread that does use the processor. By doing this, the processor runs multiple threads at the same time. This can be viewed as having two "virtual" processors. This enables a processor to perform tasks faster, sometimes 40 percent faster than without HT.

Another advantage of HT is that it's cheap to implement because the additional threads all run on the same processor elements. For example, they share the ALU (Arithmetic-Logic Unit), FPU (Floating-point unit), and system caches. However, each virtual processor needs it's own Architecture State (AS) unit.
An AS consists of registers including the Instruction Pointer, Instruction Fetcher, interrupt controller (APIC) register, and general-purpose registers. The content of these registers represents a CPU state, or a "logical" processor. Each logical processor maintains a complete set of the architecture state. So as far as the operating system is concerned, there are two CPUs.
One last thing I would like to make clear. Intel's multicore processors, even their 6-Core i7 processors, can all perform HT on each core, and each HT thread can be doing multitasking. In other words multiprocessing, multithreading, and multitasking can and frequently do operate simultaneously.
To utilize HT requires a processor with HT technology built-in. Intel introduced HT technology with the release of the 3GHz Pentium 4 processor. Now it's built-in to most Intel CPUs. It requires a motherboard with BIOS support for HT. It also requires an Operating System that supports HT. Windows XP, Linux 2.4.12, and later support HT.
If you go as far as you can see, you will then see enough to go even farther. ~John Wooden
No comments:
Post a Comment