Podcast
Questions and Answers
What action is taken if the instruction is identified as a non-branch instruction?
What action is taken if the instruction is identified as a non-branch instruction?
- Enter the instruction into the branch-target buffer
- Continue execution normally (correct)
- Initiate a misprediction process
- Jump to the predicted address
What happens when a mispredicted branch occurs?
What happens when a mispredicted branch occurs?
- The branch-target buffer is not updated
- The processor delays the execution to resolve the prediction
- The fetched instructions are retained for future use
- The execution is restarted at the correctly predicted address (correct)
What is the function of the branch-target buffer in this context?
What is the function of the branch-target buffer in this context?
- To track the execution of non-branch instructions
- To hold all executed instructions
- To store the address of predicted branch targets (correct)
- To ensure no branches are taken during execution
During the instruction decoding phase (ID), what determines if the next action involves a branch?
During the instruction decoding phase (ID), what determines if the next action involves a branch?
What does the system do if there is an entry found in the branch-target buffer and the instruction is a taken branch?
What does the system do if there is an entry found in the branch-target buffer and the instruction is a taken branch?
What is the primary purpose of the scoreboard method in CPU architecture?
What is the primary purpose of the scoreboard method in CPU architecture?
Which stage of instruction processing involves checking for structural and write-after-write (WAW) hazards?
Which stage of instruction processing involves checking for structural and write-after-write (WAW) hazards?
In the scoreboard structure, what does the 'Busy' status indicate?
In the scoreboard structure, what does the 'Busy' status indicate?
What must occur before an instruction can proceed to the Read operands stage?
What must occur before an instruction can proceed to the Read operands stage?
How does the scoreboard handle stalled instructions?
How does the scoreboard handle stalled instructions?
Which hazard type is checked during the Write result stage of instruction processing?
Which hazard type is checked during the Write result stage of instruction processing?
What aspect does the 'Register result status' of the scoreboard indicate?
What aspect does the 'Register result status' of the scoreboard indicate?
In which computer was the scoreboard method first used?
In which computer was the scoreboard method first used?
What is the role of a Tournament predictor in branch prediction?
What is the role of a Tournament predictor in branch prediction?
How does the 2-bit local predictor perform when dealing with significant branches?
How does the 2-bit local predictor perform when dealing with significant branches?
What is included in the Branch Target Buffer (BTB)?
What is included in the Branch Target Buffer (BTB)?
What is the size of memory used for 1024 entries in a local and global prediction (2,2) BHT?
What is the size of memory used for 1024 entries in a local and global prediction (2,2) BHT?
What phenomenon occurs when comparing the misprediction rates of different predictors?
What phenomenon occurs when comparing the misprediction rates of different predictors?
What is a primary benefit of Tomasulo’s algorithm compared to the Scoreboard method?
What is a primary benefit of Tomasulo’s algorithm compared to the Scoreboard method?
What is a significant limitation of the Scoreboard method?
What is a significant limitation of the Scoreboard method?
Which distinctive feature does Tomasulo’s algorithm employ to manage data dependencies?
Which distinctive feature does Tomasulo’s algorithm employ to manage data dependencies?
What hardware component is primarily increased in quantity when implementing the Scoreboard method?
What hardware component is primarily increased in quantity when implementing the Scoreboard method?
What are reservation stations used for in Tomasulo’s algorithm?
What are reservation stations used for in Tomasulo’s algorithm?
Which is NOT a feature of Tomasulo’s algorithm?
Which is NOT a feature of Tomasulo’s algorithm?
What role do redundant functional units serve in Tomasulo's algorithm?
What role do redundant functional units serve in Tomasulo's algorithm?
Which functional unit is not typically referenced in the context of the P6 architecture?
Which functional unit is not typically referenced in the context of the P6 architecture?
When is an instruction issued in Tomasulo’s algorithm?
When is an instruction issued in Tomasulo’s algorithm?
In which stage of Tomasulo's algorithm is the instruction's result written back to the destination register?
In which stage of Tomasulo's algorithm is the instruction's result written back to the destination register?
What role does the Re-order Buffer (ROB) serve in a processor's architecture?
What role does the Re-order Buffer (ROB) serve in a processor's architecture?
What is the primary benefit of dynamic branch prediction over static branch prediction?
What is the primary benefit of dynamic branch prediction over static branch prediction?
Which statement accurately describes the commit stage in Tomasulo’s algorithm?
Which statement accurately describes the commit stage in Tomasulo’s algorithm?
What is a major drawback of static branch prediction?
What is a major drawback of static branch prediction?
Which of the following correctly describes the saturating counters used in dynamic branch prediction?
Which of the following correctly describes the saturating counters used in dynamic branch prediction?
What occurs when a branch is taken during pipeline execution?
What occurs when a branch is taken during pipeline execution?
In the context of Netburst architecture, what advantage does scheduling all functional units in advance provide?
In the context of Netburst architecture, what advantage does scheduling all functional units in advance provide?
How does the branch history table (BHT) aid in dynamic branch prediction?
How does the branch history table (BHT) aid in dynamic branch prediction?
What type of branches does static prediction identify as always taken?
What type of branches does static prediction identify as always taken?
What is a likely consequence of a branch prediction mismatch?
What is a likely consequence of a branch prediction mismatch?
What does a two-level adaptive predictor utilize to make predictions?
What does a two-level adaptive predictor utilize to make predictions?
What is the main drawback of a global branch predictor?
What is the main drawback of a global branch predictor?
Which predictors concatenate local and global branch histories?
Which predictors concatenate local and global branch histories?
In a gshare predictor, how is the index in the prediction history table determined?
In a gshare predictor, how is the index in the prediction history table determined?
What is the function of local branch prediction?
What is the function of local branch prediction?
What type of predictor is used to detect loops in conditional jumps?
What type of predictor is used to detect loops in conditional jumps?
What method does the Agree predictor utilize?
What method does the Agree predictor utilize?
What information does the global branch predictor primarily use?
What information does the global branch predictor primarily use?
What is the primary purpose of the prediction history buffer?
What is the primary purpose of the prediction history buffer?
What is the role of a pattern history table in branch prediction?
What is the role of a pattern history table in branch prediction?
Which branch predictor type is characterized by individual history buffers?
Which branch predictor type is characterized by individual history buffers?
Which architecture was noted for using local branch predictors with 4-bit history?
Which architecture was noted for using local branch predictors with 4-bit history?
What is the influence of a two-bit counter in branch prediction?
What is the influence of a two-bit counter in branch prediction?
What is one drawback of using a global branch predictor over a local branch predictor?
What is one drawback of using a global branch predictor over a local branch predictor?
Flashcards
Scoreboard method
Scoreboard method
A method for dynamically scheduling a pipeline to execute instructions out-of-order, avoiding conflicts and utilizing available hardware.
Issue (ID1)
Issue (ID1)
The first stage of the Scoreboard method where the instruction is decoded, checked for structural and write-after-write (WAW) hazards, and stalled if necessary.
Read operands (ID2)
Read operands (ID2)
The second stage of the Scoreboard method where the instruction waits for read-after-write (RAW) hazards to be resolved before reading operands.
Execution (EX)
Execution (EX)
Signup and view all the flashcards
Write result (WB)
Write result (WB)
Signup and view all the flashcards
Scoreboard structure
Scoreboard structure
Signup and view all the flashcards
Functional unit status
Functional unit status
Signup and view all the flashcards
Register result status
Register result status
Signup and view all the flashcards
Tomasulo's Algorithm
Tomasulo's Algorithm
Signup and view all the flashcards
Floating-Point Unit (FPU)
Floating-Point Unit (FPU)
Signup and view all the flashcards
Structural Hazard
Structural Hazard
Signup and view all the flashcards
Common Data Bus (CDB)
Common Data Bus (CDB)
Signup and view all the flashcards
Register Renaming
Register Renaming
Signup and view all the flashcards
Data Dependency (RAW)
Data Dependency (RAW)
Signup and view all the flashcards
Write After Read (WAR) Dependency
Write After Read (WAR) Dependency
Signup and view all the flashcards
Write After Write (WAW) Dependency
Write After Write (WAW) Dependency
Signup and view all the flashcards
Reservation Stations
Reservation Stations
Signup and view all the flashcards
Commit stage
Commit stage
Signup and view all the flashcards
Re-order buffer (ROB)
Re-order buffer (ROB)
Signup and view all the flashcards
Branch prediction
Branch prediction
Signup and view all the flashcards
Static branch prediction
Static branch prediction
Signup and view all the flashcards
Dynamic branch prediction
Dynamic branch prediction
Signup and view all the flashcards
Next line predictor
Next line predictor
Signup and view all the flashcards
Saturating counters
Saturating counters
Signup and view all the flashcards
Branch History Table (BHT)
Branch History Table (BHT)
Signup and view all the flashcards
Branch Target Buffer (BTB)
Branch Target Buffer (BTB)
Signup and view all the flashcards
Prediction state
Prediction state
Signup and view all the flashcards
Correct prediction
Correct prediction
Signup and view all the flashcards
Misprediction
Misprediction
Signup and view all the flashcards
Local branch prediction
Local branch prediction
Signup and view all the flashcards
Global branch prediction
Global branch prediction
Signup and view all the flashcards
Two-level adaptive predictor
Two-level adaptive predictor
Signup and view all the flashcards
Gshare predictor
Gshare predictor
Signup and view all the flashcards
Gselect predictor
Gselect predictor
Signup and view all the flashcards
Hybrid branch prediction
Hybrid branch prediction
Signup and view all the flashcards
Loop predictor
Loop predictor
Signup and view all the flashcards
Prediction of indirect jumps
Prediction of indirect jumps
Signup and view all the flashcards
Prediction of function returns
Prediction of function returns
Signup and view all the flashcards
Local branch predictor in Pentium II/III
Local branch predictor in Pentium II/III
Signup and view all the flashcards
Global branch prediction in modern CPUs
Global branch prediction in modern CPUs
Signup and view all the flashcards
Alloyed branch prediction
Alloyed branch prediction
Signup and view all the flashcards
Agree predictor
Agree predictor
Signup and view all the flashcards
Loop predictor in a hybrid system
Loop predictor in a hybrid system
Signup and view all the flashcards
Study Notes
Computer Systems Structure - Central Processing Unit (CPU)
- The central processing unit (CPU) is a core component of computer systems.
Hazard Cases and Solutions
- Solutions for hazard cases in CPU pipelines involve techniques like scoreboard methods, Tomasulo's method, and branch prediction.
Scoreboard Method
- Used initially in the CDC 6600 computer (1966).
- Dynamically schedules instructions in a pipeline to avoid conflicts, enabling out-of-order execution if hardware is available, and no structural hazards.
- Logs data dependencies for each instruction.
- Releases instructions only when the scoreboard confirms no conflicts with previously issued, incomplete instructions.
- If an instruction stalls due to dependencies, the scoreboard monitors the pipeline to resolve those dependencies before continuing the stalled instruction.
- Instructions progress through four stages (Issue, Decode, Read Operands, Execution, Write result) before completion.
- Stages include operations like checking for structural and WAW hazards, and waiting for RAW hazards resolution.
- Scoreboard hardware has a similar cost to an FPU but could be more demanding on buses in modern processors.
- Important to note, this method does not handle forwarding.
- Stalls occur when required functional units are busy, affecting subsequent instructions.
Tomasulo's Algorithm
- Avoids structural hazards and resolves WAR and WAW hazards using register renaming and a Common Data Bus (CDB).
- Used first in IBM 360/91 computer (1969).
- Employs register renaming to create multiple copies of physical registers, minimizing dependencies.
- Real data dependencies cause no problems, unlike the limited number of registers causing a bottleneck.
- Data is placed on a CDB, and made available promptly, avoiding unnecessary delays in execution until the data is written into the destination register.
- Instructions proceed through issue, execute, write stages, carefully managing RAW dependencies and utilizing virtual values until real ones become available.
- Crucial to note this addresses issues not resolved by the scoreboard method.
Reservation Stations
- Buffers that acquire and store instruction operands for immediate availability.
- Reservation stations keep the data and result of an instruction.
- Points to registers (data is available) or other reservation stations containing necessary data before writing back to a register.
- Stores the result of an instruction execution and releases functional units once instruction execution completes.
- This release then makes results available for other reservation stations, avoiding delays.
Branch Prediction
- A method for mitigating control hazards caused by conditional jumps, by predicting the correct branch path.
- Static prediction is based on analyzing the branch instruction itself, to determine if it will take the branch or not. Common cases like procedure calls and unconditional jumps are analyzed to predict the decision.
- Dynamic prediction incorporates history of previous branch executions, to predict future behavior.
- Methods include next line prediction, and saturating counters.
Branch Prediction Methods (Dynamic)
- Next line predictor - Method stores the address of the next instruction(s) after the jump, along with the branch target address.
- Saturating counters - Use one or two bits to keep track of the decision taken in past executions. States such as Strongly not taken, weakly not taken, weakly taken, and strongly taken are used.
- Various prediction methods and modifications such as Two-level adaptive prediction, are described.
Branch Target Buffer (BTB)
- A dedicated structure containing target addresses for taken branches from past calculations, enabling faster future evaluation. -Contains jump instruction address, target address, and prediction state.
Tournament Predictor
- A powerful prediction method that combines local and global information using a selector to determine the ideal prediction based on a given branch.
Correlated Prediction - Overview
- This method combines aspects of local and global prediction, to improve accuracy.
- It considers a history table where each entry is assigned four predictors.
Misprediction Statistics/General
- Statistics about misprediction rates from simulations of the different architectures.
- Various configurations can be evaluated (number of entries, or bits per history table entry).
Commit Stage (Tomasulo's Algorithm)
- An additional stage in Tomasulo's algorithm, ROB (Reorder Buffer) assists in committing instructions in the correct order, even if their execution was out of order.
- Results are written to the ROB (Reorder Buffer) and not directly into the final destinations to allow for later reordering and avoiding pipeline stalls.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.