Hyper-threading

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Intel's Hyper-Threading Technology scheme.

Hyper-threading (officially Hyper-Threading Technology, and abbreviated HT Technology, HTT or HT) is Intel's term for its simultaneous multithreading implementation in its Atom, Intel Core i3/i5/i7, Itanium, Pentium 4 and Xeon CPUs.

Hyper-threading is an Intel-proprietary technology used to improve parallelization of computations (doing multiple tasks at once) performed on PC microprocessors. For each processor core that is physically present, the operating system addresses two virtual processors, and shares the workload between them when possible. Hyper-threading requires not only that the operating system support multiple processors, but also that it be specifically optimized for HTT, and Intel recommends disabling HTT when using operating systems that have not been optimized for this chip feature.[1]

Contents

[edit] Details

Intel Pentium 4 processor that incorporates Hyper-Threading Technology[2]

Hyper-threading works by duplicating certain sections of the processor—those that store the architectural state—but not duplicating the main execution resources. This allows a hyper-threading processor to appear as two "logical" processors to the host operating system, allowing the operating system to schedule two threads or processes simultaneously. When execution resources would not be used by the current task in a processor without hyper-threading, and especially when the processor is stalled, a hyper-threading equipped processor can use those execution resources to execute another scheduled task. (The processor may stall due to a cache miss, branch misprediction, or data dependency.)

This technology is transparent to operating systems and programs. The minimum that is required to take advantage of hyper-threading is symmetric multiprocessing (SMP) support in the operating system, as the logical processors appear as standard separate processors.

It is possible to optimize operating system behavior on multi-processor hyper-threading capable systems. For example, consider an SMP system with two physical processors that are both hyper-threaded (for a total of four logical processors). If the operating system's thread scheduler is unaware of hyper-threading it will treat all four processors as being the same. If only two threads are eligible to run it might choose to schedule those threads on the two logical processors that happen to belong to one of the physical processors; that processor would become extremely busy while the other would be idle, leading to poorer performance than is possible with better scheduling. This problem can be avoided by improving the scheduler to treat logical processors differently from physical processors; in a sense, this is a limited form of the scheduler changes that are required for NUMA systems.

[edit] History

The hyper-threading technology found its roots in Digital Equipment Corporation[3] but was brought to the market by Intel. Hyper-Threading was first introduced in the Foster MP-based Xeon in March 2002. It appeared on the 3.06 GHz Northwood-based Pentium 4 in the same year, and then appeared in every Pentium 4 HT, Pentium 4 Extreme Edition and Pentium Extreme Edition processor. Previous generations of Intel's processors based on the Core microarchitecture do not have Hyper-Threading, because the Core microarchitecture is a descendant of the P6 microarchitecture used in iterations of Pentium since the Pentium Pro through the Pentium III and the Celeron (Covington, Mendocino, Coppermine and Tualatin-based) and the Pentium II Xeon and Pentium III Xeon models.

Intel released the Nehalem (Core i7) in November 2008 in which hyper-threading makes a return. The first generation Nehalem contains four cores and effectively scales eight threads. Since then, both two- and six-core models have been released, scaling four and twelve threads respectively.[4]

The Intel Atom is an in-order processor with hyper-threading, for low power mobile PCs and low-price desktop PCs.[5]

The Itanium 9300 launched with eight threads per processor (two threads per core) through enhanced hyper-threading technology. Poulson, the next-generation Itanium, is scheduled to have additional hyper-threading enhancements.

The Intel Xeon 5500 server chips also utilize two-way hyper-threading.[6][7]

[edit] Performance

The advantages of hyper-threading are listed as: improved support for multi-threaded code, allowing multiple threads to run simultaneously, improved reaction and response time.

According to Intel the first implementation only used 5% more die area than the comparable non-hyperthreaded processor, but the performance was 15–30% better.[8]

Intel claims up to a 30% performance improvement compared with an otherwise identical, non-simultaneous multithreading Pentium 4. Tomshardware.com states "In some cases a P4 running at 3.0 GHz with HT on can even beat a P4 running at 3.6 GHz without HT turned on".[9][10] Intel also claims significant performance improvements with a hyper-threading-enabled Pentium 4 processor in some artificial intelligence algorithms. The performance improvement seen is very application-dependent, however when running two programs that require full attention of the processor it can actually seem like one or both of the programs slows down slightly when Hyper Threading Technology is turned on.[11] This is due to the replay system of the Pentium 4 tying up valuable execution resources, equalizing the processor resources between the two programs which adds a varying amount of execution time. The Pentium 4 Prescott core gained a replay queue, which reduces execution time needed for the replay system. This is enough to completely overcome that performance hit.[12]

[edit] Drawback history

When the Intel Pentium 4 3.06 GHz HT was released it was difficult for some application programmers to decide whether it was best to use Hyper Threading technology or not for their specific applications,[13] because some programmers were still testing their programs on operating systems that were not optimized for hyper threading technology (e.g. Windows 2000),[14] and most computers had single-threaded processors instead of bi-threaded processors at the time.

In 2006, hyper-threading was criticised for being energy-inefficient. For example, specialist low-power CPU design company ARM has stated simultaneous multithreading (SMT) can use up to 46% more power than dual-core designs. Furthermore, they claim SMT increases cache thrashing by 42%, whereas dual core results in a 37% decrease.[15] Intel has disputed this claim, stating that hyper-threading is highly efficient because it simply uses resources that would otherwise be idle. In 2010, ARM has stated that it will include simultaneous multithreading in its chips in the future.[16]

[edit] Security

In May 2005 Colin Percival demonstrated that on the Pentium 4, a malicious thread can use a timing attack to monitor the memory access patterns of another thread with which it shares a cache, allowing the theft of cryptographic information.[17] Potential solutions to this include the processor changing its cache eviction strategy, or the operating system preventing the simultaneous execution on the same physical core of threads with different privileges.[17]

[edit] See also

[edit] References

  1. ^ Operating Systems that include optimizations for Hyper-Threading Technology
  2. ^ Intel Processor Spec Finder: SL6WK
  3. ^ Intel hyperthreading shows Digital roots
  4. ^ Intel explains the new Core i7 CPU
  5. ^ "Intel® Atom™ Processor Microarchitecture". Intel.com. 2011-03-18. http://www.intel.com/technology/atom/microarchitecture.htm. Retrieved 2011-04-05. 
  6. ^ "Server Processor Index Page". Intel.com. 2011-03-18. http://www.intel.com/p/en_US/products/server/processor. Retrieved 2011-04-05. 
  7. ^ "Intel® Xeon® Processor 5500 Series". Intel.com. http://www.intel.com/business/resources/demos/xeon5500/performance/demo.htm. Retrieved 2011-04-05. 
  8. ^ http://www.intel.com/technology/itj/2002/volume06issue01/vol6iss1_hyper_threading_technology.pdf
  9. ^ "Summary: In Some Cases The P4 3.0HT Can Even Beat The 3.6 GHz Version : Single CPU in Dual Operation: P4 3.06 GHz with Hyper-Threading Technology". Tomshardware.com. 2002-11-14. http://www.tomshardware.com/reviews/single-cpu-dual-operation,549-25.html. Retrieved 2011-04-05. 
  10. ^ "toms hardware P4 ht 3ghz Vs p4 without ht 3.6ghz". YouTube. http://www.youtube.com/watch?v=Is7frW9Z-rw. Retrieved 2011-04-05. 
  11. ^ CPU performance evaluation Pentium 4 2.8 and 3.0
  12. ^ "Replay: Unknown Features of the NetBurst Core. Page 15". Replay: Unknown Features of the NetBurst Core.. http://www.xbitlabs.com. http://www.xbitlabs.com/articles/cpu/display/replay_15.html#sect0. Retrieved 24 April 2011. 
  13. ^ "Which apps are actually slowed by hyper-threading? [Archive] - AnandTech Forums". Forums.anandtech.com. http://forums.anandtech.com/archive/index.php/t-1273937.html. Retrieved 2011-04-05. 
  14. ^ "Hyper-Threading Technology — Operating systems that include optimizations for Hyper-Threading Technology". Intel.com. http://www.intel.com/support/processors/sb/CS-017343.htm. Retrieved 2011-04-05. 
  15. ^ www.theinquirer.net
  16. ^ Tom Jermoluk, SGI (1990s) (2010-10-13). "About MIPS and MIPS | TOP500 Supercomputing Sites". Top500.org. http://www.top500.org/blog/2010/10/13/about_mips_and_mips. Retrieved 2011-04-05. 
  17. ^ a b Cache Missing for Fun and Profit

[edit] External links

Security
Performance
Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages