- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to handle unresolved conditional branch processing policies in computer architecture?
A conditional branch cannot be computed earlier than the referenced conditional is known. For instance, if the specified condition defines the sign of the outcome of the previous instruction, the precondition of the computation is that the previous instruction has been performed.
Until the referenced condition will become known, the conditional branch is stated to unresolved. There are three basic elements utilized by processors to cope with unresolved conditional branches such as blocking branch processing, speculative execution, and multiway branching, as shown in the figure −
Blocking branch processing is the trivial element to cope with unresolved conditional branches. Execution of the conditional branch is interrupted just before the determined condition can be resolved. Early pipelined microprocessors such as the MC 68020, MC 68030, and 80386 are examples of blocking branch processing. This approach causes long penalties due to pipeline stalling as shown in the table. Therefore advanced processors employ a more favorable policy, called speculative execution.
Branch penalties in blocking branch processing
|Processor type||Taken Penalty Cycles||Not-taken penalty cycles|
|MC 68020 (1984)||5||3|
|MC 68030 (1987)||5||3|
With speculative branch processing pipeline interrupt because of the unresolved branch, conditions are prevented. After detection of an unresolved conditional branch, a guess is built as to the result of the condition, and execution remains speculatively along the guessed path.
As shown in the diagram, speculative execution contains three key elements such as the branch prediction scheme used, the extent of speculative execution, and the recovery scheme used in the case of a misprediction.
The branch prediction can be fixed or a true prediction. In a fixed prediction a similar guess is continually made, either ‘taken’ or ‘not-taken’. A true prediction has two possible outcomes, either ‘taken’ or ‘not-taken’ (fall through, sequential path).
In speculative execution, a processor continues to implement instructions speculatively until the condition is determined. But, the time interval between the beginning of the conditional execution and the resolution of the equivalent condition can change significantly.
In the case of misprediction, there are two basic elements to be implemented such as the discard the outcome of the speculative execution and continue the execution of the other, such as the correct path. When there is higher than one pending conditional branch, the corresponding alternative path should be chosen and followed.
Finally, multiway branching is the most enthusiastic scheme to cope with unresolved conditional branches. Therefore, in the case of an unresolved conditional branch, both achievable paths are followed. When the particularized condition is computed the right path is persistent. This path is accepted and the improper path is removed.
- Related Articles
- What is design space of Branch processing in computer architecture?
- What is the performance measure of branch processing in computer architecture?
- What is Vector Processing in Computer Architecture?
- What are the various approaches for branch handling in computer architecture?
- What is the Microarchitectural implementation of branch processing?
- How to Control Common Bus in Computer Architecture?
- How is computer Architecture developed?
- How to remove Load-use delay in Computer Architecture?
- How to Address Mapping using Pages in Computer Architecture?
- Example of SQL query describing the conditional processing
- What are Computer Registers in Computer Architecture?
- Computer System Architecture
- How does pipelining improve performance in computer architecture?
- What are the architecture of Parallel Processing?
- How to solve this problem of scalable computers in computer architecture?