5.3.Hardware Multithreading
5.3.Hardware Multithreading
1.Basic concepts of threads
2.Multithreading intro
Hardware multithreading allows multiple threads to share the functional units of a single processor in an overlapping fashion to try to utilize the hardware resources efficiently.
To permit this sharing, the processor must duplicate the independent state of each thread.
3.Types of hardware multithreading
There are 3 types of hardware multithreading approaches:
Fine-grained multithreading: It switches between threads on each instruction, resulting in interleaved execution of multiple threads.
It's advantage is that it can hide the throughput losses that arise from both short and long stalls, since instructions from other threads can be executed when one thread stalls. Also, since it switches threads frequently, it doesn't need to clear the pipeline everytime.
However, it slows down the execution of the individual threads.
Coarse-grained multithreading: It switch threads only on expensive stalls, such as last-level cache misses.
It's much less likely to slow down individual execution.
However, it is limited from overcoming throughput losses for pipeline start-up time.
Simultaneous multithreading: It uses a multiple-issue, dynamically scheduled pipelined processor to exploit thread-level parallelism while exploiting ILP.
With register renaming and dynamic scheduling, multiple instructions from independent threads can be issued without regard to the dependences among them; the resolution of the dependences can be handled by the dynamic scheduling capability.
SMT is always executing instructions from multiple threads, leaving it up to the hardware to associate instruction slots and renamed registers with their proper threads.