Simultaneous multithreading, acronym SMT, is a technique for improving the overall efficiency of superscalar CPUs with Hardware multithreading. SMT permits multiple independent threads of execution to better utilize the resources provided by modern computer architectures.
Multithreading is similar in concept to multitasking but is implemented at the thread level of execution in modern superscalar processors.
In processor design, there are two ways to increase on-chip parallelism with less resource requirements:
- Superscalar technique: which tries to increase Instruction level parallelism (ILP) by executing multiple instructions at the same time (termed: simultaneously); by "simultaneously" dispatching instructions (termed: instruction dispatching) to multiple redundant execution units built inside the processor.
- Chip-level multithreading (CMT) technique: using Thread level parallelism (TLP) in order to executes instructions from multiple threads within one processor chip at the same time.
There are many ways to support more than one thread inside a chip, namely:
- Interleaved multithreading (IMT) : Interleaved issue of multiple instructions from different threads, also referred to as Temporal multithreading. It can be further divided into fine-grain multithreading or coarse-grain multithreading depending on the frequency of interleaved issues. Fine-grain multithreading issues instructions for different threads after every cycle, while coarse-grain multithreading only switches to issue instructions from another thread when the current executing thread causes some long latency events (like page fault etc.). Coarse-grain multithreading is more common for less context switch between threads. For processors with one pipeline per core, interleaved multithreading is the only possible way, because it can only issue up to one instruction per cycle.
- Simultaneous multithreading (SMT): Issue multiple instructions from multiple threads in one cycle. The processor must be superscalar to do so.
- Chip-level multiprocessing (CMP or Multi-core processor): integrates two or more superscalar processors into one chip, each executes threads independently.
- Any combination of IMT/SMT/CMP
The key factor to distinguish them is to look at how many instructions the processor can issue in one cycle and how many threads from which the instructions come.