Multithreading lets a CPU or a single processor core provide multiple threads of execution. This lesson explains why processors use multithreading, how it can improve overall throughput, what trade-offs it introduces, and how coarse-grained multithreading switches between threads.
A thread is a sequence of instructions that can be scheduled for execution. A processor that supports multithreading can provide execution for multiple threads, either by switching among them or by issuing their instructions in overlapping ways.
All flashcards
What is multithreading in computer architecture?
It is a CPU's or core's ability to provide multiple threads of execution, by switching among threads or overlapping their instruction execution.
What is throughput?
Throughput is the rate at which a system completes work. Multithreading can raise total throughput even when it does not make an individual thread faster.
How can a cache miss create an opportunity for multithreading?
A cache miss may leave a thread waiting for data. The processor can run another ready thread during that wait and use resources that might otherwise be idle.
What is block multithreading?
It is a scheme that runs one thread until a significant stall occurs, then switches to another ready thread. It is also called coarse-grained or cooperative multithreading.
What are common costs of multithreading?
Threads can contend for shared caches and TLBs; switching hardware and scheduling add costs; and synchronization or inter-process communication can add software overhead.
Quiz questions
What is the main purpose of multithreading in throughput computing?Answer: To raise the total rate of completed work across multiple threads.
How can threads interfere when they share caches?Answer: One thread can evict useful cached data belonging to another thread.
When does block multithreading typically switch from one thread to another?Answer: When the current thread encounters a significant, long-latency stall.
What distinguishes simultaneous multithreading from temporal multithreading?Answer: Simultaneous multithreading can issue instructions from multiple threads in one cycle.
What can replicating all software-visible thread state enable?Answer: It may allow each thread to maintain state for a separate virtual machine.