Intel Hyper-Threading
Total Page:16
File Type:pdf, Size:1020Kb
Intel Hyper-Threading Matthew Joyner & Mike Diep Computer Architecture Outline ● What is Multithreading ● Temporal Multithreading ● Simultaneous Multithreading ● Intel's Hyper-Threading ○ Architecture ○ Performance ○ Drawbacks ○ Pros vs. Cons What is Multithreading? ● Multithreading is similar to preemptive multitasking except it takes place at the thread level rather than the process level ● There are two main implementations of multithreading ○ Temporal Multithreading (TMT) ■ Only 1 thread per pipeline stage ○ Simultaneous Multithreading (SMT) ■ More than 1 thread per pipeline stage ● The Barrel Processor is an example of Temporal Multithreading ● Intel's Hyper Threading (HT) is an example of Simultaneous Multithreading Temporal Multithreading ● Allows only 1 thread per pipeline stage ● There are 2 kinds of Temporal Multithreading ○ Coarse-Grain ■ The pipeline only contains 1 thread at a time and performs a rapid context switch to another thread ■ This switch can occur based on factors such as cycle count, long latency events, and fairness ○ Fine-Grain ■ The pipeline can contain multiple threads with each pipeline stage potentially having a different thread ■ An example is the Barrel Processor which processes N threads, executing an instruction from each thread once every N cycles Simultaneous Multithreading ● Allows more than 1 thread per pipeline stage ● Requires the ability to fetch instructions from multiple threads in a cycle and a larger register file to store information from multiple threads ● The maximum number of concurrent threads is decided during design but practical restrictions have limited it 2 concurrent threads for most SMT implementations SMT Implementations ● Digital Equipment Corporation ○ Alpha 21464 (2004) (Canceled) ● Intel ○ Xeon (2002) ○ Pentium 4 (2003) ○ i7 (2008) ○ Atom (2008) ● RMI Corporation ○ XLR ● IBM ○ POWER5 Intel Microarchitecture Roadmap Timeline of Hyper Threading ● 1995 - Simultaneous Multithreading: Maximum On-Chip Parallelism by Dean M. Tullsen, Susan J Eggers and Henry M Levy at the University of Washington ● 1997 - Digital Electronics Corp. and a group of from the University of Washington were working on a project to design a processor with Simultaneous Multithreading ● 1997 - A legal dispute between DEC and Intel ends with Intel licensing the patents for SMT from DEC as well as hiring most of the researchers that had been working on the project Timeline of Hyper Threading Cont. ● 2002 - Intel releases the first Xeon processor model with Hyper Threading ● 2003 - Intel releases the Pentium 4 bringing Hyper Threading to desktop computers ● 2005 - Unable to solve problems inherent to the Netburst microarchitecture Intel announces plans to discontinue the Pentium 4 line and switch over to the Core microarchitecture ● 2007 - Intel finishes switching to the Core series microarchitecture which removed Hyper Threading ● 2008 - Intel releases the i7 based on the Nehalem microarchitecture which reintroduces Hyper Threading Hyper-Threading Architecture ● 4 logical processors ● Each logical processor has an architecture state that contains general purpose registers, the control registers, advanced programmable interrupt controller (APIC) registers, and some machine state registers ● "This implementation of Hyper-Threading Technology added less than 5% to the relative chip size and maximum power requirements, but can provide performance benefits much greater than that." - Intel Hyper-Threading Architecture Benefits up to 30% boost Multi-Core Speedup Multithread Speedup Speedup Summary Benchmarks Drawbacks ● Requires at least OS support for SMT but preferably optimization HT to use ○ Windows XP and later ○ Linux 2.5 and later ● With a timing attack a thread could monitor the cache use of another thread on the same core allowing the theft of cryptographic information ● Higher operating temperatures ● Doesn't handle resource intensive threads well ● Lower performance gain than multi-core Pros vs. Cons ● Possible increased ● possible decreased speed up speed up ● lower power overall ● higher power consumption consumption short ● uses less space term compared to another ● higher temperature core ● older operating systems does not support Questions?.