Changes

Jump to: navigation, search

Computer Architecture

74 bytes added, 22:51, 26 November 2016
Basic CPU Features
* '''Pre-fetching''' is the process of retrieving instructions from memory before executing them. Done effectively, this avoids pipeline stalls due to cache misses.
* '''Branch prediction''' is used to guess whether a branch will be taken or not taken based on past history. For example, in most loops, the same branch is taken repeatedly until the loop exit condition is met, so a prediction that the loop will be taken will be correct most of the time. However, inside the loop, there may be a conditional statement ("if") which is usually executed, so predicting that the branch that skirts around the conditional code will ''not'' be taken will be correct most of the time. Branch prediction is used in conjunction with pre-fetching and pipelining to improve performance.
* '''Pipelining''' is the sequential decoding and execution of an instruction. As each instruction is passed through the stages of a pipeline, other instructions can be processed by other stages. However, when a conditional branch appears, a decision must be made ''before the conditional branch can be evaluated'': should the pipeline be filled with the instructions that are on the code path associated with taking the branch, or with not taking the branch? In either case, if the wrong branch prediction is made, then the contents of the entire pipeline must be discarded. The pipeline can be stalled if an execution unit is not available when needed or if a memory read or write is stalled by cache. Execution based on branch prediction is called ''speculative execution''.
== Memory Design ==

Navigation menu