Its main goal is to separate the loading of data from

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: of predicting and executing one of the paths of a branch, the processor executes the instructions of all the paths of the branch exploiting as much parallelism as possible. Now when the processor discovers the actual branch outcome, it retains the valid results and discards other results. Thus branch predication effectively removes the negative impact of branch prediction technique in cases of branch 4 mispredict. 3. Speculation. Speculation is a technique used to obtain improved performance by reducing the effect of memory-to-processor speed mismatch. The memory access speed being much slower than the processor speed, it is desirable that data required during the course of execution is loaded and kept ready before it is actually required by the processor. Speculative data loading technique is designed to take care of this requirement. Its main goal is to separate the loading of data from its actual use. It not only allows the processor to load a piece of data from memory before a program actually needs it, but it also postpones the reporting of exceptions if the loaded data is illegal. Speculation technique is also implemented by taking help of the compiler. For this, the compiler analyses the program at compile time, looking for any instructions that will need data from memory. It inserts speculative load instructions in the instructions stream of the program well ahead of the instructions that need data from memory. It also inserts a matching speculative check instruction immediately before the instructions that need data from memory. It now reorders the surrounding instructions so that the processor can dispatch them in parallel. Now when the processor encounters a speculative load instruction at runtime, it retrieves and loads the data from the memory. When the processor encounters the speculative check instruction, it verifies the load before allowing the program to use the loaded data in the next instruction. If the load is invalid, the processor does not immediately report an exception. It postpones the exception reporting unti...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online