CSC/ECE 506 Fall 2007/wiki4 7 jp07: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Helper Threads ==
== Helper Threads ==


One of the problems when using parallel machines is that the machine is only trying to execute sequential code.  Therefore, much of the benefit of having the ability to run multiple threads simultaneously is lost.  This is true of many multi-threading paradigms including Simultaneous Multithread Systems (SMTs), Symmetric Multiprocessors (SMPs), and Chip Multiprocessors (CMPs).
One of the problems when using parallel machines is that the machine is only trying to execute sequential code.  Therefore, much of the benefit of having the ability to run multiple threads simultaneously is lost.  This is true of many multi-threading paradigms including Simultaneous Multithread Systems (SMTs) (link), Symmetric Multiprocessors (SMPs) (link), and Chip Multiprocessors (CMPs) (link).


The natural solution it seems would be to rewrite or recompile the programs to make use of parallel execution.  But, in some cases this may be too time consuming or even unfeasible due to the nature of the program.  Therefore, there is a middle ground where the program is not truly parallelized but the multithreading capabilities are utilized to improve execution time.  This technique is known as helper threads.
The natural solution it seems would be to rewrite or recompile the programs to make use of parallel execution.  But, in some cases this may be too time consuming or even unfeasible due to the nature of the program.  Therefore, there is a middle ground where the program is not truly parallelized but the multithreading capabilities are utilized to improve execution time.  This technique is known as helper threads.
Line 14: Line 14:


=== Speculative Branch Prediction ===
=== Speculative Branch Prediction ===
One class of helper thread applications is prediction helper threads early [Difficult Path Branch Prediction]


=== Speculative Value Prediction ===
=== Speculative Value Prediction ===
Line 23: Line 25:
== Additional Links ==
== Additional Links ==


[http://www-cse.ucsd.edu/users/tullsen/dsp.pdf Dynamic Speculative Precomputation]
* [http://www-cse.ucsd.edu/users/tullsen/dsp.pdf Dynamic Speculative Precomputation]
[http://www.tinker.ncsu.edu/ericro/publications/conference_ASPLOS-9.pdf Slipstream Processors]
* [http://www.tinker.ncsu.edu/ericro/publications/conference_ASPLOS-9.pdf Slipstream Processors]
* [http://www.ece.rochester.edu/~mihuang/TEACHING/OLD/ECE404_SPRING03/HTsurvey.pdf A Survey on Helper Threads]
* [http://findarticles.com/p/articles/mi_qa3751/is_200603/ai_n17175362 HeapMON] -- Helper Thread Bug Detection Scheme with contributions from NCSU
* [http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/mi/&toc=comp/mags/mi/2004/06/m6toc.xml&DOI=10.1109/MM.2004.75 Helper Threads via Virtual Multithreading]
* [http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/proceedings/&toc=comp/proceedings/isca/2002/1605/00/1605toc.xml&DOI=10.1109/ISCA.2002.1003588 Difficult Path Branch Prediction using Helper Threads]
* [http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fpact05.ce.ucsc.edu%2Fdatacentric.pdf&ei=8SpOR_2oNJvMeMXjpY8N&usg=AFQjCNGKl9aloiJ_PrQHobjnHMmHvwzo0g&sig2=klWNxGwt7yrPpjciV9MpzQ Compiler Support for Helper Threading]

Revision as of 03:00, 29 November 2007

Helper Threads

One of the problems when using parallel machines is that the machine is only trying to execute sequential code. Therefore, much of the benefit of having the ability to run multiple threads simultaneously is lost. This is true of many multi-threading paradigms including Simultaneous Multithread Systems (SMTs) (link), Symmetric Multiprocessors (SMPs) (link), and Chip Multiprocessors (CMPs) (link).

The natural solution it seems would be to rewrite or recompile the programs to make use of parallel execution. But, in some cases this may be too time consuming or even unfeasible due to the nature of the program. Therefore, there is a middle ground where the program is not truly parallelized but the multithreading capabilities are utilized to improve execution time. This technique is known as helper threads.

Helper threads run in parallel to the main thread, and do work for the main thread to improve it's performance [Olokuton]. Typically these threads will execute parts of the program "ahead" of the main thread, in an attempt to predict branches and/or values before the main thread completes. This is done to help shadow the penalty of long latency instructions. The figure below illustrates the basic concepts of helper thread execution.

Note that in a CMP the two contexts would be separate chips, or in an SMT they would be separate thread contexts. The main sequential program will have some knowledge from previous training or via the compiler that a potential long latency instruction such as a cache miss is upcoming. Through some history or prior knowledge the helper thread runs ahead of the main thread executing the instruction vital only to the long-latency instruction. This thread completes ahead of the main thread, so that when the main thread finally reaches the long latency instruction, the helper thread can forward the computed result.

Applications of Helper Threads

Speculative Branch Prediction

One class of helper thread applications is prediction helper threads early [Difficult Path Branch Prediction]

Speculative Value Prediction

Slipstream Technology

Pre-computation Slices

Additional Links