1. What is instruction pipelining?
a) Executing multiple instructions simultaneously
b) Breaking down instruction execution into separate stages
c) Fetching data from multiple sources
d) Executing instructions serially
Answer: b) Breaking down instruction execution into separate stages
2. Which stage in the pipeline is responsible for fetching instructions from memory?
a) Decode
b) Fetch
c) Execute
d) Write-back
Answer: b) Fetch
3. What does the decode stage in a pipeline do?
a) Perform arithmetic calculations
b) Interpret the fetched instruction
c) Fetch data from memory
d) Store the result
Answer: b) Interpret the fetched instruction
4. Which of the following is NOT a typical pipeline stage?
a) Fetch
b) Decode
c) Interrupt
d) Write-back
Answer: c) Interrupt
5. What is the primary benefit of pipelining?
a) Reduce instruction size
b) Increase instruction throughput
c) Simplify instruction execution
d) Decrease clock speed
Answer: b) Increase instruction throughput
6. What is a pipeline hazard?
a) A delay caused by dependencies between instructions
b) A performance boost in the pipeline
c) The completion of an instruction stage
d) An error in memory fetching
Answer: a) A delay caused by dependencies between instructions
7. What is a data hazard in pipelining?
a) When two instructions need the same resource
b) When the wrong instruction is fetched
c) When an instruction depends on the result of a previous instruction
d) When the pipeline fails
Answer: c) When an instruction depends on the result of a previous instruction
8. Which of the following is a control hazard?
a) When the pipeline fetches the wrong instruction due to a branch
b) When two instructions access the same memory
c) When an instruction is executed out of order
d) When there is a delay in the write-back stage
Answer: a) When the pipeline fetches the wrong instruction due to a branch
9. What is a structural hazard in pipelining?
a) When an instruction depends on data not yet computed
b) When two instructions compete for the same hardware resource
c) When the pipeline stalls due to a branch misprediction
d) When the ALU fails
Answer: b) When two instructions compete for the same hardware resource
10. What is pipeline stall?
a) When the CPU runs out of power
b) When a pipeline stage is delayed and the next stage has to wait
c) When instructions are executed in parallel
d) When the pipeline fetches an instruction from memory
Answer: b) When a pipeline stage is delayed and the next stage has to wait
11. How can data hazards be resolved in a pipelined processor?
a) Flushing the pipeline
b) Instruction reordering
c) Using the same memory for data and instructions
d) Adding more pipeline stages
Answer: b) Instruction reordering
12. What is instruction-level parallelism (ILP)?
a) Executing multiple instructions simultaneously within a pipeline
b) Executing instructions sequentially
c) Writing data to memory
d) Decoding multiple instructions at once
Answer: a) Executing multiple instructions simultaneously within a pipeline
13. What is forwarding (also known as bypassing) used for in a pipeline?
a) To prevent branch mispredictions
b) To reduce the impact of data hazards by passing data directly to dependent stages
c) To speed up the fetch stage
d) To combine multiple instructions into one
Answer: b) To reduce the impact of data hazards by passing data directly to dependent stages
14. What is branch prediction used for in pipelining?
a) To guess the outcome of a branch instruction before it is resolved
b) To execute branches in parallel
c) To reorder instructions
d) To execute instructions in reverse order
Answer: a) To guess the outcome of a branch instruction before it is resolved
15. What happens if a branch is mispredicted in a pipeline?
a) The pipeline continues execution as normal
b) The pipeline must be flushed, and the correct instructions fetched
c) The CPU shuts down
d) The incorrect branch is executed
Answer: b) The pipeline must be flushed, and the correct instructions fetched
16. Which technique can help reduce control hazards in pipelining?
a) Instruction prefetching
b) Branch prediction
c) Data forwarding
d) Cache coherence
Answer: b) Branch prediction
17. What is meant by pipeline depth?
a) The number of stages in the pipeline
b) The amount of data processed per cycle
c) The number of instructions processed simultaneously
d) The number of ALUs in the CPU
Answer: a) The number of stages in the pipeline
18. What is pipeline interlocking?
a) A technique to prevent simultaneous access to the same hardware resource
b) A method to reduce instruction fetches
c) A mechanism to stop the pipeline until hazards are resolved
d) A way to execute instructions out of order
Answer: c) A mechanism to stop the pipeline until hazards are resolved
19. How can structural hazards in a pipeline be minimized?
a) Using branch prediction
b) Increasing the number of functional units
c) Reordering instructions
d) Using a deeper pipeline
Answer: b) Increasing the number of functional units
20. What is the function of the execute stage in a pipeline?
a) Perform instruction decoding
b) Execute the operation specified by the instruction
c) Write data to memory
d) Fetch instructions
Answer: b) Execute the operation specified by the instruction
21. Which pipeline stage writes the result of an instruction back to the register file?
a) Fetch
b) Execute
c) Decode
d) Write-back
Answer: d) Write-back
22. What does it mean when a pipeline has a bubble?
a) There is an empty slot in the pipeline due to a stall
b) An instruction is executed incorrectly
c) The pipeline is flushed
d) Instructions are being executed in parallel
Answer: a) There is an empty slot in the pipeline due to a stall
23. What is the purpose of the fetch stage in a pipeline?
a) Execute the instruction
b) Fetch the next instruction from memory
c) Store the result in memory
d) Decode the instruction
Answer: b) Fetch the next instruction from memory
24. How does pipelining improve CPU performance?
a) By decreasing the instruction size
b) By allowing multiple instructions to be processed simultaneously at different stages
c) By increasing clock speed
d) By reducing power consumption
Answer: b) By allowing multiple instructions to be processed simultaneously at different stages
25. What is a load-use data hazard?
a) A hazard that occurs when a load instruction is followed by an instruction that uses the loaded data
b) A hazard caused by storing data
c) A control hazard in the decode stage
d) A structural hazard due to limited memory access
Answer: a) A hazard that occurs when a load instruction is followed by an instruction that uses the loaded data
26. Which of the following is a method to handle branch hazards in pipelining?
a) Instruction prefetching
b) Instruction bypassing
c) Pipeline flushing
d) Register renaming
Answer: c) Pipeline flushing
27. What is the role of the decode stage in pipelining?
a) Write the results to memory
b) Convert the fetched instruction into control signals
c) Execute the instruction
d) Fetch the next instruction
Answer: b) Convert the fetched instruction into control signals
28. How does pipeline flushing affect performance?
a) It increases performance by removing hazards
b) It reduces performance due to wasted clock cycles
c) It has no effect on performance
d) It speeds up instruction execution
Answer: b) It reduces performance due to wasted clock cycles
29. What is a branch delay slot?
a) A delay introduced after a branch instruction to resolve the branch
b) The time taken for a branch to be resolved
c) An extra cycle added to execute a branch
d) A method of instruction reordering
Answer: a) A delay introduced after a branch instruction to resolve the branch
30. What is the role of an instruction queue in pipelining?
a) To store intermediate results from the ALU
b) To hold instructions before they enter the pipeline
c) To predict branch outcomes
d) To reorder instructions
Answer: b) To hold instructions before they enter the pipeline
31. What does dynamic scheduling do in a pipeline?
a) It schedules instructions based on the availability of resources to avoid hazards
b) It decodes multiple instructions at once
c) It flushes the pipeline after each instruction
d) It reduces the number of stages in the pipeline
Answer: a) It schedules instructions based on the availability of resources to avoid hazards
32. What is speculative execution in pipelining?
a) Executing instructions in the correct order
b) Guessing the outcome of instructions and executing them before they are confirmed
c) Stalling the pipeline when hazards occur
d) Writing results to memory early
Answer: b) Guessing the outcome of instructions and executing them before they are confirmed
33. What is the difference between static and dynamic branch prediction?
a) Static prediction always makes the same guess, while dynamic prediction adapts based on past behavior
b) Static prediction is faster than dynamic prediction
c) Dynamic prediction is only used for structural hazards
d) Static prediction guesses based on memory access, while dynamic prediction guesses based on data
Answer: a) Static prediction always makes the same guess, while dynamic prediction adapts based on past behavior
34. What does the term “out-of-order execution” mean in pipelining?
a) Instructions are executed in the order they are fetched
b) Instructions are executed in the order of their priority
c) Instructions are executed as soon as their operands are available, regardless of their original order
d) Instructions are reordered in memory before being executed
Answer: c) Instructions are executed as soon as their operands are available, regardless of their original order
35. Which technique can be used to handle structural hazards?
a) Cache memory
b) Instruction prefetching
c) Increasing the number of execution units
d) Branch prediction
Answer: c) Increasing the number of execution units
36. What is meant by register renaming in pipelining?
a) Reordering instructions to avoid register conflicts
b) Using different physical registers to avoid data hazards
c) Renaming instructions for better clarity
d) Swapping registers between different stages
Answer: b) Using different physical registers to avoid data hazards
37. Which of the following is a typical symptom of a pipeline bubble?
a) Increased power consumption
b) Decreased instruction throughput
c) Faster instruction execution
d) Decreased clock speed
Answer: b) Decreased instruction throughput
38. What is a branch target buffer (BTB)?
a) A cache for storing predicted branch addresses
b) A unit for performing branch instructions
c) A technique to reduce structural hazards
d) A buffer for holding the result of branch instructions
Answer: a) A cache for storing predicted branch addresses
39. How does instruction reordering help with data hazards?
a) It increases the clock speed
b) It allows independent instructions to be executed while waiting for data
c) It combines multiple instructions into one
d) It eliminates the need for branch prediction
Answer: b) It allows independent instructions to be executed while waiting for data
40. What is the role of the instruction decode stage in the pipeline?
a) Fetch the next instruction from memory
b) Convert the instruction into control signals for execution
c) Write the result to memory
d) Execute the instruction directly
Answer: b) Convert the instruction into control signals for execution
41. What is meant by a pipeline flush?
a) Clearing all instructions from the pipeline
b) Executing instructions in parallel
c) Storing the result in memory
d) Prefetching multiple instructions
Answer: a) Clearing all instructions from the pipeline
42. Which of the following helps minimize branch hazards?
a) Branch prediction
b) Data forwarding
c) Instruction cache
d) Dynamic scheduling
Answer: a) Branch prediction
43. What does pipeline depth refer to?
a) The number of stages in the pipeline
b) The number of instructions executed per clock cycle
c) The amount of data stored in registers
d) The time taken to execute one instruction
Answer: a) The number of stages in the pipeline
44. What is a RAW (Read After Write) hazard?
a) When an instruction needs data that has not yet been written
b) When data is read from memory before it is written
c) When two instructions write to the same register
d) When data is written to memory twice
Answer: a) When an instruction needs data that has not yet been written
45. What is the function of a reorder buffer in pipelining?
a) To hold results until instructions are ready to be committed in order
b) To store instructions before they are executed
c) To predict branches
d) To reorder data in the cache
Answer: a) To hold results until instructions are ready to be committed in order
46. How does out-of-order execution affect performance?
a) It reduces performance by increasing hazards
b) It improves performance by allowing independent instructions to be executed when ready
c) It has no impact on performance
d) It eliminates the need for pipelining
Answer: b) It improves performance by allowing independent instructions to be executed when ready
47. What is a WAW (Write After Write) hazard?
a) When two instructions try to write to the same register at the same time
b) When data is written to memory twice in a row
c) When data is read from memory after it has been written
d) When an instruction depends on data that has not been read yet
Answer: a) When two instructions try to write to the same register at the same time
48. How does pipeline forwarding work?
a) It sends data directly between pipeline stages to avoid hazards
b) It fetches instructions early to avoid stalls
c) It writes the result to memory before execution is complete
d) It flushes the pipeline when hazards occur
Answer: a) It sends data directly between pipeline stages to avoid hazards
49. What does pipeline latency refer to?
a) The time taken to complete all stages of an instruction
b) The number of instructions executed per cycle
c) The delay caused by data hazards
d) The time taken to fetch an instruction from memory
Answer: a) The time taken to complete all stages of an instruction
50. How can pipeline bubbles be minimized?
a) By using deeper pipelines
b) By improving branch prediction accuracy
c) By reducing the number of functional units
d) By decreasing clock speed
Answer: b) By improving branch prediction accuracy.
Read More Computer Architecture MCQs
- SET 1: Computer Architecture MCQs
- SET 2: Computer Architecture MCQs
- SET 3: Computer Architecture MCQs
- SET 4: Computer Architecture MCQs
- SET 5: Computer Architecture MCQs
- SET 6: Computer Architecture MCQs
- SET 7: Computer Architecture MCQs
- SET 8: Computer Architecture MCQs
- SET 9: Computer Architecture MCQs
- Introduction to Computer Architecture MCQs
- Basic Components of a Computer System MCQs
- CPU Organization MCQs
- Instruction Set Architecture (ISA) MCQs
- Microarchitecture MCQs
- Memory Hierarchy MCQs
- Cache Memory MCQs
- Input/Output Organization MCQs
- Bus Architecture MCQs
- Performance Metrics MCQs
- Parallelism in Computer Architecture MCQs
- Multicore and Multiprocessor Systems MCQs
- Control Unit Design MCQs
- Pipeline Hazards MCQs
- Branch Prediction and Speculation MCQs
- Arithmetic and Logic Operations MCQs
- Memory Management MCQs
- Power and Energy Efficiency MCQs
- Advanced Topics MCQs
- Emerging Trends
Related Posts:
- Structural, Data, and Control Hazards MCQs
- Anesthesia MCQs on Stages of anesthesia
- Natural Hazards and Disaster Solved MCQ's
- Pipeline Hazards MCQs
- Techniques to Overcome Hazards (Stalling, Forwarding, Branch Prediction) MCQs
- Write a program that determines a student’s grade. The program will read three types of scores (quiz, mid-term, and final scores) and…