Multithreading Flashcards
What is a thread
lightweight process with own instructions and data
• Thread may be a process part of a parallel program of
multiple processes, or it may be an independent program
• Each thread has all the state (instructions, data, PC, register state, and so on) necessary to allow it to execute
What is Data Level Parallelism
Perform identical operations on data, and lots of data (e.g., managing vectors and matrices).
How does the amount of computation assigned to each thread Varys?
Amount of computation assigned to each thread is the grain size:
– Can be from a few instructions (more suited to
uniprocessor multithreading: for 1 processor, need n threads)
– To hundreds, or thousands of instructions
(multiprocessor multithreading: for n processors, need n threads)
What are the Types of Multithreading
Several different types of multithreading for a superscalar processor:
– Coarse-grained Multithreading: when a thread is stalled, perhaps for a cache miss, another thread can be executed;
– Fine-grained Multithreading: switching from one thread to another thread on each instruction, such as Sun Niagara T1 and T2;
– Simultaneous Multithreading: multiple thread are using the multiple issue slots in a single clock cycle à exploiting TLP and ILP, such as IBM Power and Intel Core i7.
Explain the coarse-grain multithreaded
Long stalls (such as L2 cache misses) are hidden by switching to another thread that uses the resources of the processor.
See picture 22
Explain the Fine-grained Multithreading
Basic idea: At each clock cycle we must switch to another thread, in a sort of round-robin among active threads!
See picture 22
Explain the Simultaneous Multithreding (SMT)
Simultaneously schedule instructions for execution from all threads to maximize the use of resources.
See picture 22