Static and Dynamic Branch Prediction MCQs

By: Prof. Dr. Fazal Rehman | Last updated: September 20, 2024

In static branch prediction, decisions are made based on: A) Branch history B) Fixed rules or heuristics C) Compiler hints D) Dynamic execution Answer: B Static branch prediction is often used in: A) Superscalar processors B) VLIW architectures C) Out-of-order execution D) Modern dynamic processors Answer: B Dynamic branch prediction uses: A) Branch history and runtime information B) Compiler-generated hints C) Fixed outcomes for each branch D) Manual programmer input Answer: A A common static branch prediction heuristic is to: A) Always predict “not taken” B) Always predict “taken” C) Use branch history D) Use global prediction Answer: B Which technique is more adaptive to runtime behavior? A) Static prediction B) Dynamic prediction C) Hybrid prediction D) Compiler-based prediction Answer: B Which type of branch predictor requires no additional hardware for tracking branch history? A) Static predictor B) Dynamic predictor C) Local predictor D) Hybrid predictor Answer: A The simplest static branch prediction technique is to: A) Always predict “taken” B) Always predict “not taken” C) Use the program counter D) Use a saturating counter Answer: A Dynamic branch prediction improves performance by: A) Reducing the branch prediction buffer size B) Adapting to branch behavior at runtime C) Using fixed branch outcomes D) Using compiler-generated predictions Answer: B Static prediction is less effective in: A) Simple control flow B) Complex and data-dependent branches C) Loop structures D) Function calls Answer: B The accuracy of dynamic branch prediction improves with: A) Larger branch history buffers B) Fixed prediction schemes C) Reduced pipeline depth D) Fewer conditional branches Answer: A Which predictor uses both local and global history to improve prediction accuracy? A) Static predictor B) Gshare predictor C) Two-bit predictor D) Hybrid predictor Answer: D A dynamic branch predictor typically involves: A) Pipeline stalling B) Pipeline flushing C) Table-based prediction D) Instruction prefetching Answer: C Static branch prediction can lead to performance degradation in cases of: A) Constant branching patterns B) Loops with few iterations C) Highly dynamic branching behavior D) Short pipeline depth Answer: C Which of the following is true for dynamic branch prediction? A) It is less accurate than static prediction B) It adapts to the branch behavior at runtime C) It requires no hardware support D) It uses a fixed prediction model Answer: B A two-bit branch predictor is a form of: A) Static prediction B) Dynamic prediction C) Compiler-based prediction D) Hybrid prediction Answer: B Static branch prediction performs better when: A) Branch behavior is unpredictable B) Branch outcomes are data-dependent C) Branch patterns are predictable D) Pipelines are very deep Answer: C Dynamic branch prediction is often used in: A) VLIW architectures B) RISC processors C) SIMD processors D) Superscalar architectures Answer: D Which of the following does not involve dynamic branch prediction? A) History-based prediction B) Two-bit predictor C) Compiler-generated prediction D) Gshare predictor Answer: C The primary advantage of dynamic branch prediction over static branch prediction is: A) Simplicity B) Reduced hardware complexity C) Higher accuracy D) Lower cost Answer: C A branch history table (BHT) is used in: A) Static prediction B) Dynamic prediction C) Compiler-based prediction D) Instruction reordering Answer: B Static branch prediction works well for: A) Data-dependent branches B) Simple loops and function calls C) Complex and unpredictable branches D) Global branch history Answer: B Dynamic branch prediction is more useful in: A) Control-intensive applications B) Data-parallel applications C) Single-cycle execution D) Simple pipelined processors Answer: A Which of the following is true for a dynamic branch predictor? A) It always predicts the branch outcome as “taken” B) It relies on past branch behavior to make predictions C) It requires manual configuration by the programmer D) It performs poorly in complex pipelines Answer: B Static branch prediction is based on: A) Fixed branch outcomes B) Runtime branch history C) Hybrid prediction models D) Cache coherence Answer: A Dynamic prediction adjusts predictions based on: A) Pipeline stages B) Branch history at runtime C) Loop unrolling D) Function inlining Answer: B One common type of dynamic branch predictor is the: A) Static predictor B) Gshare predictor C) Manual predictor D) Compiler-assisted predictor Answer: B In dynamic branch prediction, a mispredicted branch typically leads to: A) Immediate execution of the next instruction B) Pipeline flushing C) Memory cache reloading D) Arithmetic errors Answer: B Which type of prediction is more hardware-intensive? A) Static prediction B) Dynamic prediction C) Compiler prediction D) Static hinting Answer: B Static branch prediction is often used in: A) Performance-critical applications B) Embedded systems and simpler architectures C) Highly parallel architectures D) Large-scale cloud systems Answer: B Which of the following is more complex to implement? A) Static branch prediction B) Dynamic branch prediction C) Loop unrolling D) Function inlining Answer: B A saturating counter is used in: A) Static prediction B) Dynamic branch prediction C) Compiler-generated hints D) Hardware caches Answer: B Dynamic branch predictors often rely on: A) Instruction-level parallelism B) Local and global branch history C) Arithmetic computation D) Simple heuristics Answer: B Static branch prediction is less effective when: A) Branches are highly predictable B) The control flow is simple C) Branch behavior is irregular and data-dependent D) The pipeline is shallow Answer: C The Gshare predictor combines: A) Static and dynamic prediction B) Local history and branch history C) Global history and branch addresses D) Compiler hints and fixed outcomes Answer: C A mispredicted branch in dynamic prediction usually requires: A) Stalling the entire pipeline B) Flushing and refetching instructions C) Re-executing all previous instructions D) Instruction prefetching Answer: B Dynamic prediction uses a branch history table (BHT) to: A) Store the target addresses of branches B) Store previous outcomes of branches C) Store compiler-generated branch hints D) Store predicted outcomes of future branches Answer: B Which branch prediction scheme is more power-efficient? A) Static branch prediction B) Dynamic branch prediction C) Hybrid prediction D) Local branch prediction Answer: A Dynamic branch prediction uses a: A) History table that stores fixed outcomes B) Table that stores outcomes of previous branch instructions C) Static rule to predict branch behavior D) Predetermined address for each branch Answer: B Which of the following does not rely on runtime behavior? A) Static prediction B) Dynamic prediction C) Gshare predictor D) Hybrid predictor Answer: A Branch misprediction penalties are generally higher in: A) Static branch prediction B) Dynamic branch prediction C) Deep pipelined processors D) Non-pipelined processors Answer: C A two-level dynamic branch predictor improves prediction accuracy by: A) Using two bits for each branch B) Using both local and global branch history C) Storing the target address of each branch D) Reducing the depth of the pipeline Answer: B A Gshare branch predictor is a type of: A) Static branch predictor B) Dynamic branch predictor C) Compiler-based branch predictor D) Cache-based predictor Answer: B Static branch prediction is often sufficient in: A) Deeply pipelined systems B) Complex control flows C) Simple loops and branches D) Dynamic workloads Answer: C Dynamic branch prediction performs better than static prediction in: A) Data-independent branches B) Loops with fixed iteration counts C) Complex control-intensive applications D) Applications with no branches Answer: C The key challenge in dynamic branch prediction is: A) Managing the pipeline depth B) Handling branch mispredictions C) Reducing clock speed D) Increasing the number of instructions per cycle Answer: B A hybrid predictor combines: A) Static and dynamic techniques B) Local and global branch histories C) Two types of dynamic predictors D) Compiler-generated hints with dynamic prediction Answer: A

Read More Computer Architecture MCQs

  1. SET 1: Computer Architecture MCQs
  2. SET 2: Computer Architecture MCQs
  3. SET 3: Computer Architecture MCQs
  4. SET 4: Computer Architecture MCQs
  5. SET 5: Computer Architecture MCQs
  6. SET 6: Computer Architecture MCQs
  7. SET 7: Computer Architecture MCQs
  8. SET 8: Computer Architecture MCQs
  9. SET 9: Computer Architecture MCQs
 
All Copyrights Reserved 2025 Reserved by T4Tutorials