大家好 ,手边有两题有点疑问
台大电机 100
(10)Forwarding is a common technique th eliminate data hazard occuring among
pipelining instruction.
However,not all data hazard can be eliminate by forwarding.
Support on a particular machine,if an instruction following a load instr
-uction depends on the result of the load instruction,then a data hazard has
occured , and pipeline is stalled for one cycle
Which of following statements are not correct?
(a) In addition to data hazard,there can be control hazard in this
situation because we cannot determine the proper data to load
in the MEM pipeline stage.
应改为 ID pipeline stage
(b) Assume the percentage of load instruction is 20% in a program
, and half the time the instruction following a load needs
the result of the load instruction.
Then , the performance degradtion due to the data hazard is 1.1
1 + 0.2* (1/2)
Performance = ────── = 1.1
1
performance degradtion due to the data hazard = 1.1 - 1 = 0.1
(e) All of the above are correct.
Ans: a,b,e
台大电机 99
Which of the following statement are true ?
(a) If the data requested by a load instruction has not yet become
availble when it is requested , the load-use data hazard occur.
when its next and dependency instruction is requested
(b) Data hazard may be resolved with bypassing technique which
retrieve the hitting data element from internal buffers
rather than waitting for it to arrive from external memory
hitting 应改为 missing
(c) If the proper instruction cannot execute in proper clock cycle
because the instruction that was fetched is not that is needed
, the data hazard occurs .
control hazard