When a control hazard occurs, what usually happens is to simply insert 3 bubbles. But, why does the first image says the penalty is only one? What's the case?  I would like to know more about control hazards and its solutions, that's the question. I would like to know about the penalties in the case we assume a branch will be always takes, always untaken, and when we do not assume anything. For better understanding, if possibly, I would like to know about what happens in the stages (IF, ID, EX, MEM, WB) too, considering 5 stage pipeline. Also, please clarify if we need forwarding.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

When a control hazard occurs, what usually happens is to simply insert 3 bubbles. But, why does the first image says the penalty is only one? What's the case? 

I would like to know more about control hazards and its solutions, that's the question. I would like to know about the penalties in the case we assume a branch will be always takes, always untaken, and when we do not assume anything. For better understanding, if possibly, I would like to know about what happens in the stages (IF, ID, EX, MEM, WB) too, considering 5 stage pipeline. Also, please clarify if we need forwarding.

Program
execution
order
(in instructions)
add x4, x5, x6
beq x1, x0, 40
Time
200 400 600 800
or x7, x8, x9
Instruction
fetch
200 ps
Data
access
Reg ALU
Reg ALU
Instruction
fetch
Reg
Reg
Coubble Coubble Coubble Coubble Coubble
Instruction
fetch
Reg ALU
400 ps
Data
access
FIGURE 4.29 Pipeline showing stalling on every conditional branch as solution to control
hazards. This example assumes the conditional branch is taken, and the instruction at the destination of
the branch is the or instruction. There is a one-stage pipeline stall, or bubble, after the branch. In reality, the
process of creating a stall is slightly more complicated, as we will see in Section 4.8. The effect on performance,
however, is the same as would occur if a bubble were inserted.
1000 1200 1400
Data
access
Reg
Transcribed Image Text:Program execution order (in instructions) add x4, x5, x6 beq x1, x0, 40 Time 200 400 600 800 or x7, x8, x9 Instruction fetch 200 ps Data access Reg ALU Reg ALU Instruction fetch Reg Reg Coubble Coubble Coubble Coubble Coubble Instruction fetch Reg ALU 400 ps Data access FIGURE 4.29 Pipeline showing stalling on every conditional branch as solution to control hazards. This example assumes the conditional branch is taken, and the instruction at the destination of the branch is the or instruction. There is a one-stage pipeline stall, or bubble, after the branch. In reality, the process of creating a stall is slightly more complicated, as we will see in Section 4.8. The effect on performance, however, is the same as would occur if a bubble were inserted. 1000 1200 1400 Data access Reg
Expert Solution
Step 1

Dependencies in a pipelined processor

 

There are mainly three types of dependencies possible in a pipelined processor. These are :
1) Structural Dependency
2) Control Dependency
3) Data Dependency

These dependencies may introduce stalls in the pipeline.

Stall: A stall is a cycle in the pipeline without new input.
 
Structural dependency

This dependency arises due to the resource conflict in the pipeline. A resource conflict is a situation when more than one instruction tries to access the same resource in the same cycle. A resource can be a register, memory, or ALU.

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Requirement Gathering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education