1 Inorder vs Outoforder Execution Inorder instruction execution149instructions are fetched executed completed in compilergenerated order149one stalls they all stall149instructions a ID: 265749
Download Pdf The PPT/PDF document "Spring 2006CSE 471 --Introduction to Out..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
1 Spring 2006CSE 471 --Introduction to Out-of-Order Execution In-order vs. Out-of-order Execution In-order instruction executioninstructions are fetched, executed & completed in compiler-generated orderone stalls, they all stallinstructions are statically scheduledOut-of-order instruction executioninstructions are fetched in compiler-generated orderinstruction completion may be in-order (today) or out-of-order (older in between they may be executed in some other orderindependent instructions behinda stalled instruction can pass itinstructions are dynamically scheduled Spring 2006CSE 471 --Introduction to Out-of-Order Execution Dynamic Scheduling Out-of-order processors:after instruction decodecheck for structural hazardsan instruction can be issuedwhen a functional unit is available an instruction stalls if no appropriate functional unitcheck for datahazardsan instruction can execute when its operands have been calculated or loaded from memoryan instruction stalls if operands are not available 2 Spring 2006CSE 471 --Introduction to Out-of-Order Execution Dynamic Scheduling Out-of-order processors:dont wait for previous instructions to execute if this instruction does not depend on them, i.e., independent ready instructions can execute before earlier instructions that are stalledcase 1: stalled has missed in a cachewhen independent instructions go around a loaduse lockup-free cachesthat allow instruction issue to continue while a miss is being satisfiedthe load-use instruction still stalls Spring 2006CSE 471 --Introduction to Out-of-Order Execution Dynamic Scheduling in-order processors, 100($4)in execution, cache missadd $2, , $4waits until the miss is satisfiedsub $5, $6, $7waits for the addout-of-order processors, 100($4)in execution, cache misssub $5, $6, $7can execute during the cache missadd $2, , $4waits until the miss is satisfied 3 Spring 2006CSE 471 --Introduction to Out-of-Order Execution Dynamic Scheduling Out-of-order processors:ready instructions can execute before earlier instructions that are case 2: path instructions are waiting for a branchcondition to be computedwhen path instructions go around a branchinstruction:the instructions that are issued from the predicted path are issued speculatively, called speculative executionspeculative instructions can execute (but not commit) before the branch is resolvedif the prediction was wrong, speculative instructionsare flushed from the pipelineif prediction is right, instructions are no longer speculative Spring 2006CSE 471 --Introduction to Out-of-Order Execution Speculative Execution speculation: executing an instruction before it is known that it should be executedall instructions that are fetched because of a prediction are speculativeinorder pipeline:branch is executed before the pathout-of-order pipeline:path can be executed before the branchspeculative instructions can executed but not committedgetting rid of wrong-path instructions is not just a matter of flushing them from the pipeline 4 Spring 2006CSE 471 --Introduction to Out-of-Order Execution Speculative Execution In addition, executing speculative instructions:must be safe (no additional exceptions) or must handle the exceptions after the instruction is no longer speculativemust generate the same results