Machine-translated by Google. Questions are authored in English.
Top

Pipelining Questions and Answers

1.

Which one of the following dependencies among the register operands of different instructions can cause a data hazard in a pipelined processor?

Exam Year(s)

GATE CS - 2026,

Answer: B

The dependence that causes a data hazard is Read-after-write.

In a read-after-write (true) dependence, a later instruction reads a register that an earlier instruction writes. In a pipeline the later instruction can reach its operand-read stage before the earlier one has written its result back, so it would read a stale value unless the pipeline stalls or forwards the result.

Read-after-read never causes a hazard, because reading does not change the register. Write-after-read and write-after-write are name dependences: in the standard in-order pipeline, where every instruction reads early and writes in the last stage in program order, they cannot go wrong. They become hazards only in pipelines that let instructions complete out of order, where register renaming removes them.

Please log in or register to report this question.

2.

An instruction format has the following structure:

Instruction Number: Opcode destination reg, source reg-1, source reg-2

Consider the following sequence of instructions to be executed in a pipelined processor:

I1: DIV R3, R1, R2
I2: SUB R5, R3, R4
I3: ADD R3, R5, R6
I4: MUL R7, R3, R8

Which of the following statements is/are TRUE?

Exam Year(s)

GATE CS - 2024,

Answer: A

Only the first statement is true: There is a RAW dependency on R3 between I1 and I2.

I1 writes R3 and I2 then reads R3, so I2 must wait for I1's result: a read-after-write (true) dependency.

The other three name the wrong kind of hazard. Between I1 and I3 both instructions write R3, which is write-after-write (WAW), not WAR. Between I2 and I3, I2 reads R3 and I3 later writes it, which is write-after-read (WAR), not RAW. Between I3 and I4, I3 writes R3 and I4 reads it, which is RAW, not WAW.

Please log in or register to report this question.

3.

An 8086 microprocessor can fatch and Pre-fetch upto.......... bytes of instructions and stores them in the queue :

Exam Year(s)

MH SET - 2018, SET Exam - 2018,

Answer: B

The 8086 can prefetch up to 6 bytes.

The 8086's bus interface unit fetches instruction bytes ahead of time while the execution unit is busy and stores them in a 6-byte first-in first-out instruction queue. This overlap of fetching and executing is a simple form of pipelining.

8 bytes is not the 8086 figure (its 8-bit-bus sibling, the 8088, has a 4-byte queue), and 16 and 20 bytes confuse the queue with the 16-bit data bus and the 20-bit address bus.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Pipelining Questions and Answers || Pipelining MCQ Questions and Answers || Pipelining GK Questions and Answers || Pipelining GK MCQ Questions || Pipelining Multiple Choice Questions and Answers || Pipelining GK || GK on Pipelining || Computer Organization and Architecture Questions and Answers || Computer Organization and Architecture MCQ Questions and Answers || Computer Organization and Architecture GK Questions and Answers || GK on Computer Organization and Architecture