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.
Please write and solve one question about ideal transformer (parametric). Also, please write and solve one...
Please write and solve one question about ideal transformer (parametric). Also, please write and solve one more question about a 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
1. Is yoga an end result or a process? What are three different ways to achieve...
1. Is yoga an end result or a process? What are three different ways to achieve yoga? Outline the process of meditation that Krishna reveals to Arjuna as a course for achieving yoga. (250 words). 2. What, according to Krishna, is the proper mode of human action (karma)? How is the relationship between action (karma) and duty (dharma) discussed in this poem? (600 words)
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...
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?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT