Upload
hoangnhi
View
231
Download
2
Embed Size (px)
Citation preview
Intel Hyper-ThreadingMatthew Joyner & Mike Diep
Computer Architecture
● What is Multithreading● Temporal Multithreading● Simultaneous Multithreading● Intel's Hyper-Threading
○ Architecture○ Performance○ Drawbacks○ Pros vs. Cons
Outline
● 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
What is 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
Temporal 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
Simultaneous Multithreading
● Digital Equipment Corporation○ Alpha 21464 (2004) (Canceled)
● Intel○ Xeon (2002)○ Pentium 4 (2003)○ i7 (2008)○ Atom (2008)
● RMI Corporation○ XLR
● IBM○ POWER5
SMT Implementations
Intel Microarchitecture Roadmap
● 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
● 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
Timeline of Hyper Threading Cont.
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 provideperformance benefits much greater than that." - Intel
Hyper-Threading Architecture
up to 30% boost
Benefits
Multi-Core Speedup
Multithread Speedup
Speedup Summary
Benchmarks
● 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
Drawbacks
Pros vs. Cons● Possible increased
speed up● lower power overall
consumption● uses less space
compared to another core
● possible decreased speed up
● higher power consumption short term
● higher temperature● older operating
systems does not support
Questions?