Structural, Data, and Control Hazards MCQs

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

What is a structural hazard in a pipelined processor? A) A conflict over the use of a resource B) A dependency on data from a previous instruction C) A mis-prediction of branch outcomes D) An issue with instruction execution order Answer: A Which type of hazard occurs when two instructions compete for the same hardware resource? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What is the primary method to resolve structural hazards in pipelined processors? A) Data Forwarding B) Branch Prediction C) Resource Duplication D) Instruction Reordering Answer: C Which hazard is characterized by the delay in instruction execution due to the need for a shared resource? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What type of hazard arises when one instruction requires data that has not yet been computed by a previous instruction? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: A How can data hazards be mitigated in a pipelined processor? A) By adding more functional units B) Through data forwarding and stalling C) By predicting branch outcomes D) By increasing the number of pipeline stages Answer: B Which of the following describes a Read-After-Write (RAW) hazard? A) An instruction needs to write to a register that another instruction has already read B) An instruction needs to write to a register that another instruction will later write to C) An instruction needs to read data from a register that a previous instruction has yet to write D) An instruction writes to a register before a previous instruction has read it Answer: C What is the main effect of a control hazard in pipelined execution? A) Incorrect results due to delayed data B) Pipeline stalls due to unresolved branch outcomes C) Resource conflicts leading to execution delays D) Execution of instructions out of order Answer: B Which technique can help reduce the impact of control hazards? A) Data Forwarding B) Branch Prediction C) Resource Duplication D) Register Renaming Answer: B What does data forwarding do in a pipelined processor? A) It resolves conflicts over hardware resources B) It passes the result of one instruction directly to a subsequent instruction C) It predicts the outcome of conditional branches D) It handles structural hazards by adding more units Answer: B Which of the following is NOT a solution to address structural hazards? A) Adding more hardware resources B) Using resource sharing techniques C) Increasing pipeline depth D) Instruction reordering Answer: B What type of hazard involves instructions being executed in an incorrect order due to dependencies? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: A Which hazard is directly addressed by adding more functional units in a processor? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What is the effect of a Write-After-Write (WAW) hazard in a pipeline? A) Incorrect data read due to an unresolved write B) Conflicts over the usage of hardware resources C) Incorrect results due to multiple writes to the same register D) Pipeline stalls due to delayed branch resolution Answer: C Which hazard is caused when instructions execute out of order due to resource conflicts? A) Structural Hazard B) Data Hazard C) Control Hazard D) Resource Hazard Answer: A What technique is used to handle data hazards by delaying the execution of instructions? A) Data Forwarding B) Pipeline Stalling C) Resource Duplication D) Branch Prediction Answer: B Which hazard can occur when an instruction writes to a register before a previous instruction has read it? A) Read-After-Write (RAW) Hazard B) Write-After-Read (WAR) Hazard C) Write-After-Write (WAW) Hazard D) Structural Hazard Answer: B What is the main purpose of branch prediction in pipelined processors? A) To manage resource conflicts B) To resolve data hazards C) To improve the accuracy of branch outcomes D) To minimize structural hazards Answer: C Which of the following is a method to handle Read-After-Write (RAW) hazards? A) Branch Prediction B) Data Forwarding C) Resource Duplication D) Register Renaming Answer: B What happens during a pipeline stall due to a data hazard? A) The pipeline advances normally B) Subsequent instructions are delayed until the data dependency is resolved C) The processor duplicates hardware resources D) Branch outcomes are predicted Answer: B Which of the following best describes a Write-After-Read (WAR) hazard? A) An instruction needs to read data from a register that another instruction has already written to B) An instruction writes to a register that a previous instruction has yet to read C) An instruction writes to a register that another instruction will later write to D) An instruction reads data from a register before a previous instruction writes to it Answer: B What is a common solution for managing control hazards? A) Register Renaming B) Data Forwarding C) Branch Prediction D) Pipeline Stalling Answer: C What technique is used to address Write-After-Read (WAR) hazards? A) Data Forwarding B) Branch Prediction C) Pipeline Stalling D) Register Renaming Answer: D Which of the following is NOT a type of pipeline hazard? A) Structural Hazard B) Data Hazard C) Control Hazard D) Resource Hazard Answer: D What effect does a structural hazard have on the execution of instructions in a pipeline? A) It causes incorrect data results B) It creates delays due to conflicts over hardware resources C) It results in incorrect branch predictions D) It leads to execution of instructions out of order Answer: B Which hazard is managed by ensuring that there are enough functional units to handle simultaneous requests? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What technique helps to minimize the effects of data hazards by allowing instructions to be executed out of order? A) Register Renaming B) Data Forwarding C) Branch Prediction D) Pipeline Stalling Answer: A Which hazard can be reduced by adding more pipeline stages? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What issue arises from a Write-After-Write (WAW) hazard in a pipeline? A) Incorrect data read due to delayed writes B) Multiple instructions writing to the same register C) Incorrect branch outcomes D) Delays in resolving data dependencies Answer: B How does the use of out-of-order execution help with pipeline hazards? A) It handles control hazards more effectively B) It reduces delays from data hazards by reordering instructions C) It resolves structural conflicts by adding more units D) It improves branch prediction accuracy Answer: B What is the effect of a control hazard on the pipeline? A) Execution delays due to unresolved branch outcomes B) Incorrect results due to data dependency conflicts C) Resource conflicts causing stalls D) Instructions being executed out of order Answer: A What is a typical result of not resolving a structural hazard? A) Increased accuracy in branch predictions B) Delays or stalls in instruction execution C) Improved data forwarding capabilities D) Enhanced out-of-order execution Answer: B Which of the following techniques can help resolve Write-After-Write (WAW) hazards? A) Data Forwarding B) Register Renaming C) Branch Prediction D) Resource Duplication Answer: B What is the primary function of a reservation station in a pipelined processor? A) To handle control hazards B) To manage instruction dependencies and data forwarding C) To predict branch outcomes D) To duplicate hardware resources Answer: B Which hazard occurs when an instruction needs to write to a register before a previous instruction has finished reading it? A) Write-After-Write (WAW) Hazard B) Read-After-Write (RAW) Hazard C) Write-After-Read (WAR) Hazard D) Structural Hazard Answer: C What is the main challenge of handling control hazards in a pipelined processor? A) Ensuring correct data forwarding B) Avoiding delays due to branch mis-predictions C) Managing conflicts over hardware resources D) Handling out-of-order instruction execution Answer: B What method involves waiting until a previous instruction completes before proceeding? A) Data Forwarding B) Pipeline Stalling C) Branch Prediction D) Resource Duplication Answer: B Which type of hazard can be addressed by using branch target buffers? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: B How does the addition of more execution units help with pipeline hazards? A) It resolves data hazards through forwarding B) It reduces control hazards by improving prediction accuracy C) It addresses structural hazards by preventing resource conflicts D) It improves the handling of Write-After-Read (WAR) hazards Answer: C What is the effect of using speculative execution in a pipelined processor? A) It reduces structural hazards B) It improves branch prediction and reduces control hazards C) It resolves data forwarding issues D) It manages Write-After-Write (WAW) hazards Answer: B Which hazard is caused when two instructions write to the same register at the same time? A) Write-After-Read (WAR) Hazard B) Read-After-Write (RAW) Hazard C) Write-After-Write (WAW) Hazard D) Structural Hazard Answer: C What is the role of out-of-order execution in handling pipeline hazards? A) It resolves data dependencies by reordering instructions B) It improves the accuracy of branch predictions C) It handles structural conflicts by adding more resources D) It resolves control hazards directly Answer: A What is a structural hazard in pipelined processors? A) Conflict over hardware resources B) Delay due to uncompleted data C) Error in branch prediction D) Dependency between instructions Answer: A Which type of hazard occurs when an instruction requires a functional unit that is already in use? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What type of hazard arises when a pipeline stage needs to access a resource that is currently being used by another stage? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C How can structural hazards be minimized in a pipelined processor? A) Data Forwarding B) Increasing the number of functional units C) Branch Prediction D) Register Renaming Answer: B Which of the following describes a data hazard? A) Conflict over the use of the same hardware resource B) Instruction execution delays due to data dependencies C) Branch mis-prediction affecting execution flow D) Resource conflict in pipeline stages Answer: B What is the purpose of data forwarding in pipelined processors? A) To resolve structural hazards B) To manage control hazards C) To pass data directly between pipeline stages D) To predict branch outcomes Answer: C Which type of hazard involves a delay caused by instructions waiting for data to be read or written? A) Structural Hazard B) Data Hazard C) Control Hazard D) Resource Hazard Answer: B What is a common technique to handle data hazards in pipelined processors? A) Register Renaming B) Increasing pipeline stages C) Resource Duplication D) Branch Prediction Answer: A What type of hazard is addressed by implementing branch prediction? A) Data Hazard B) Structural Hazard C) Control Hazard D) Resource Hazard Answer: C Which hazard occurs due to incorrect branch predictions affecting subsequent instructions? A) Data Hazard B) Structural Hazard C) Control Hazard D) Resource Hazard Answer: C What technique is used to manage control hazards in pipelined processors? A) Data Forwarding B) Branch Prediction C) Register Renaming D) Resource Duplication Answer: B Which hazard can cause pipeline stalls when an instruction depends on the result of a previous instruction? A) Structural Hazard B) Data Hazard C) Control Hazard D) Resource Hazard Answer: B What strategy can be employed to handle Write-After-Read (WAR) hazards? A) Data Forwarding B) Register Renaming C) Branch Prediction D) Pipeline Stalling Answer: B How can control hazards be mitigated? A) By using data forwarding B) By increasing the number of functional units C) By predicting branch outcomes D) By adding more pipeline stages Answer: C Which hazard is resolved by duplicating hardware resources? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What is the effect of a Write-After-Write (WAW) hazard in a pipeline? A) Incorrect data read due to a write delay B) Multiple instructions writing to the same register C) Conflicts over the usage of functional units D) Delayed branch outcomes Answer: B What technique helps to handle a Read-After-Write (RAW) hazard? A) Branch Prediction B) Register Renaming C) Data Forwarding D) Pipeline Stalling Answer: C What is the primary function of branch prediction in pipelined processors? A) To handle data hazards B) To resolve structural hazards C) To improve control flow efficiency D) To duplicate hardware resources Answer: C Which pipeline hazard is addressed by using speculative execution? A) Data Hazard B) Structural Hazard C) Control Hazard D) Resource Hazard Answer: C What issue is caused by a control hazard? A) Incorrect results from uncompleted instructions B) Delays due to data dependencies C) Conflicts over hardware resources D) Pipeline stalls or flushing Answer: D What method is used to handle Write-After-Read (WAR) hazards? A) Data Forwarding B) Register Renaming C) Branch Prediction D) Pipeline Stalling Answer: B What happens when there is a structural hazard in a pipelined processor? A) Data forwarding is used to resolve conflicts B) Instructions are executed out of order C) The pipeline experiences delays due to resource conflicts D) Branch prediction is re-evaluated Answer: C Which hazard involves a delay because an instruction needs to use a resource that is already in use? A) Data Hazard B) Structural Hazard C) Control Hazard D) Resource Hazard Answer: B What is the impact of data forwarding on pipeline hazards? A) It eliminates structural hazards B) It resolves data hazards by passing data directly between stages C) It reduces the number of pipeline stages D) It addresses control hazards Answer: B What technique is used to resolve conflicts over resource usage in a pipeline? A) Data Forwarding B) Resource Duplication C) Branch Prediction D) Register Renaming Answer: B How does register renaming help manage data hazards? A) By duplicating hardware resources B) By predicting branch outcomes C) By providing unique identifiers for registers to avoid conflicts D) By handling control hazards Answer: C What problem arises with a mis-predicted branch in a pipeline? A) Incorrect results due to delayed data B) Incorrect execution flow leading to pipeline flushing C) Conflicts over hardware resources D) Data forwarding issues Answer: B What does the term ‘stalling’ refer to in pipeline processing? A) Executing instructions out of order B) Waiting for data dependencies to be resolved C) Using data forwarding to avoid hazards D) Managing structural conflicts Answer: B Which hazard can be minimized by reordering instructions in a pipeline? A) Control Hazard B) Structural Hazard C) Data Hazard D) Resource Hazard Answer: C What is the primary solution to handle control hazards in modern processors? A) Register Renaming B) Data Forwarding C) Branch Prediction D) Resource Duplication Answer: C What does ‘out-of-order execution’ primarily address in pipelined processors? A) Structural Hazards B) Data Hazards C) Control Hazards D) Resource Hazards Answer: B Which hazard is resolved by adding more execution units or functional units to a processor? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: C What is the impact of pipeline stalls on processor performance? A) It reduces the number of pipeline stages B) It delays the execution of subsequent instructions C) It improves branch prediction accuracy D) It eliminates data hazards Answer: B What type of hazard is associated with simultaneous write operations to the same register? A) Data Hazard B) Structural Hazard C) Control Hazard D) Write-After-Write (WAW) Hazard Answer: D Which hazard is commonly handled by using data forwarding techniques? A) Data Hazard B) Structural Hazard C) Control Hazard D) Resource Hazard Answer: A How does speculative execution help in managing pipeline hazards? A) By increasing the number of functional units B) By executing instructions before knowing the branch outcome C) By forwarding data between pipeline stages D) By renaming registers Answer: B What is the role of a reservation station in a pipelined processor? A) To manage data dependencies and forwarding B) To handle control hazards C) To duplicate hardware resources D) To predict branch outcomes Answer: A What technique involves temporarily holding up instructions to manage data hazards? A) Data Forwarding B) Pipeline Stalling C) Out-of-Order Execution D) Branch Prediction Answer: B Which type of hazard occurs when multiple instructions write to the same register in a pipeline? A) Data Hazard B) Control Hazard C) Structural Hazard D) Write-After-Write (WAW) Hazard Answer: D What is a common method to resolve Write-After-Write (WAW) hazards? A) Register Renaming B) Data Forwarding C) Branch Prediction D) Resource Duplication Answer: A How does increasing the number of pipeline stages affect hazards? A) It resolves structural hazards B) It minimizes data hazards C) It can increase control hazards D) It improves data forwarding Answer: C What type of hazard occurs when an instruction needs to use a result that is not yet available? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: A Which technique helps to avoid pipeline stalls due to data hazards? A) Data Forwarding B) Register Renaming C) Branch Prediction D) Resource Duplication Answer: A What problem is addressed by using a branch target buffer (BTB)? A) Data Hazard B) Structural Hazard C) Control Hazard D) Resource Hazard Answer: C What is the purpose of implementing multiple functional units in a processor? A) To handle data hazards B) To manage control hazards C) To avoid structural hazards D) To predict branch outcomes Answer: C Which hazard can be minimized by using a branch history table? A) Data Hazard B) Structural Hazard C) Control Hazard D) Resource Hazard Answer: C What does register renaming aim to prevent in a pipelined processor? A) Data Forwarding B) Structural Conflicts C) Data Hazards D) Control Hazards Answer: C What is the primary issue caused by structural hazards? A) Incorrect data due to uncompleted instructions B) Conflicts over the usage of hardware resources C) Pipeline stalls from branch mis-predictions D) Incorrect results from data dependencies Answer: B Which technique is used to manage pipeline stalls resulting from control hazards? A) Data Forwarding B) Resource Duplication C) Branch Prediction D) Register Renaming Answer: C What is the primary cause of a Read-After-Write (RAW) hazard? A) Conflicts over functional units B) Incorrect branch predictions C) Dependencies between instructions D) Multiple writes to the same register Answer: C How can the performance impact of Write-After-Write (WAW) hazards be reduced? A) By using data forwarding B) By adding more pipeline stages C) By implementing register renaming D) By increasing the number of functional units Answer: C What is the main purpose of branch prediction in pipelined processors? A) To handle structural hazards B) To reduce data forwarding requirements C) To improve control flow performance D) To manage resource conflicts Answer: C What is a typical solution to handle Resource Hazards in pipelined processors? A) Data Forwarding B) Resource Duplication C) Branch Prediction D) Register Renaming Answer: B Which hazard involves a delay because an instruction needs results from a previous instruction that has not yet completed? A) Data Hazard B) Control Hazard C) Structural Hazard D) Resource Hazard Answer: A What happens during pipeline stalls? A) Instructions are executed out of order B) The pipeline holds up the execution of subsequent instructions C) Data is forwarded to the next stage D) Branch predictions are re-evaluated Answer: B How does speculative execution help in pipelined processors? A) By increasing functional units B) By executing instructions before knowing the branch outcome C) By avoiding data hazards D) By resolving structural conflicts Answer: B

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