Question

In: Computer Science

Write in full sentence please be descriptive What are the three different ways to solve a...

Write in full sentence please be descriptive

What are the three different ways to solve a Data Hazard (including ALU+ ALU data Hazard and LW+ALU data Hazard)?

Solutions

Expert Solution

Data Hazards occur when an instruction depends on the result of previous instruction and that result of instruction has not yet been computed. whenever two different instructions use the same storage. They course imperfection in pipelining. It attempt use item before it is ready.

Following is a simple example to explain data hazard b/w two instructions.

ADD R5, R3, R4

SUB R7, R5, R6

here R5 is used in the second instruction which is the result of first instruction.

We should eliminate this kind of data hazard. For that we have 3 ways. And they are;

1. Give responsibility to the software- This puts the responsibility of removing hazards onto the compiler writer, and involves no extra hardware.

2.Eliminate by  implement hardware to detect hazards, if they exist, and to insert a delay in the circuit which is called stalls.

Stalls are inserted to skip one stall cycle and instruction is waiting until other same instruction or depended instruction complete or data hazard is chance is leave. The simplest way to fix the hazard is to stall the pipeline. Stalling involves blocking flow of instructions until the result is ready to be used.

3. Instruction Reordering

For example:

ADD R5, R3, R4

SUB R7, R5, R6

ADD R1, R0

This can be resolved by re ordering the instruction as

ADD R5, R3, R4

ADD R1, R0

SUB R7, R5, R6


Related Solutions

Explain any three ways to solve the problem of underemployment
Explain any three ways to solve the problem of underemployment
What are the ways that they are the same and the ways that there are different?
Bohr versus Schrodinger. Compare and contrast the Bohr model and the Schrodinger model for hydrogen. What are the ways that they are the same and the ways that there are different? 
Please write and solve one question about identical transformer (parametric). Also, please write and solve one...
Please write and solve one question about identical transformer (parametric). Also, please write and solve one more question about real transformer (numerical). You can get help from the Electric Machinery. A.E. Fitzgerald book. (Add approximations if any) I'm waiting for two questions with answers to learn transformers in detail.
In what three ways can influenza viruses solve the problem of expressing multiple proteins with limited...
In what three ways can influenza viruses solve the problem of expressing multiple proteins with limited genetic space
Glycolysis and gluconeogenesis are opposite pathways. What are three different ways that the pathways are kept...
Glycolysis and gluconeogenesis are opposite pathways. What are three different ways that the pathways are kept from canceling each other out?
what are the three different ways to measure VOLL? describe the superior technique and why it...
what are the three different ways to measure VOLL? describe the superior technique and why it is superior
In what ways did the Cold War reshape global politics? Topic Sentence/Thesis Statement: Your first sentence...
In what ways did the Cold War reshape global politics? Topic Sentence/Thesis Statement: Your first sentence should directly answer the question in the assignment. It should be clear and direct, and provide an argument. If you write a sentence that is too general, then you will not be able to organize your answer and to provide details. First Criterion: In this section, you will provide and analyze evidence that supports the first part of your Thesis Statement. Remember to use...
Using these three terms, write a sentence to describe the role of the Third National Bank...
Using these three terms, write a sentence to describe the role of the Third National Bank in the money creation process. (Demand Deposit--Legal Reserve—Excess Reserves) Mrs. Jones decides to flip her mattress one day and discovers $1000 in the process. She decides to take that $1000 to the Third National Bank and makes a deposit. The Required Reserve Ratio from the Federal Reserve Bank is 20%. Explain the amount of new money that can be created by Third National Bank,...
In what ways is the BSP and Fed similar? And in what ways they significantly different?
In what ways is the BSP and Fed similar? And in what ways they significantly different?
1. Please explain some ways that budget assumptions may be off or different then what was...
1. Please explain some ways that budget assumptions may be off or different then what was projected. 2. Paying for Information Technology is more of an operational or capital expense? 3. When looking to cut FTEs, why is it easier to eliminate open positions or cut overtime, rather than eliminating current full time staff?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT