133k views
3 votes
A) Suppose a computer has an instruction pipeline with 4 phases. How many cycles (if there are no delays) would it take to complete 80 instructions. How many cycles would it take if the processor were not pipelined?

b) Explain the problem caused by a conditional branch instruction in a pipeline.
c) Give 2 ways of dealing with the problem of conditional branching.

1 Answer

3 votes

Answer:

Step-by-step explanation:

(a) Given data:

Instruction pipeline with 4 phases.

80 instruction

The number of cycles if the processor were pipelined :

80-1 = (79) instruction takes only 1 extra cycle to complete.

So, cycles counts = 4 + (79) = 83 cycles.

The number of cycles if the processor were not pipelined.

Each instruction takes 4 cycles to complete.

So, cycle counts = 80 * 4 = 320 cycles.

(b) One of the main problems of conditional branching in pipelines is the delay it gives even after the branch target buffer.

In pipeline, conditional branches depend on the codes which are still in estimation.

(c) Two ways to deal with problem arising due to conditional branching are as follows :

1. Delayed Branching

2. Multiple Condition Codes

User Igor Kraskynlykov
by
6.4k points