202004261306373620rohit Engg Multi Threaded
202004261306373620rohit Engg Multi Threaded
Types of multithreading
Interleaved/Temporal multithreading
Coarse-grained multithreading
The simplest type of multithreading occurs when one thread runs until it is blocked
by an event that normally would create a long-latency stall. Such a stall might be a
cache miss that has to access off-chip memory, which might take hundreds of CPU
cycles for the data to return. Instead of waiting for the stall to resolve, a threaded
processor would switch execution to another thread that was ready to run. Only
when the data for the previous thread had arrived, would the previous thread be
placed back on the list of ready-to-run threads.
For example:
Simultaneous multithreading
The most advanced type of multithreading applies to superscalar processors.
Whereas a normal superscalar processor issues multiple instructions from a single
thread every CPU cycle, in simultaneous multithreading (SMT) a superscalar
processor can issue instructions from multiple threads every CPU cycle.
Recognizing that any single thread has a limited amount of instruction-level
parallelism, this type of multithreading tries to exploit parallelism available across
multiple threads to decrease the waste associated with unused issue slots.
For example: