Question:medium

A non-pipelined instruction execution unit that operates at 1.6 GHz clock takes an
average of 5 clock cycles to complete the execution of an instruction. To improve
the performance, the system was pipelined with a goal of achieving an average
throughput of one instruction per clock cycle. However, it could operate only at
1.2 GHz due to pipeline overheads. While executing a program in the pipelined
design, 30% of instructions encountered a stall of 2 cycles due to pipeline hazards.
The speed-up obtained by the pipelined design over the non-pipelined one for this
program is ___________. (rounded off to two decimal places)
Note: \(1\mathrm{G}=10^9\)

Show Hint

Find time per instruction for each design (Time = CPI x Clock Period), where pipelined CPI = 1 + (fraction stalled x stall cycles) = 1 + 0.3x2 = 1.6. Then Speed-up = Time(non-pipelined) / Time(pipelined).
Updated On: Aug 3, 2026
Show Solution

Correct Answer: 2.3

Solution and Explanation

An alternative way to solve this is by directly comparing the total clock cycles taken per instruction, converted to real time, in both designs, without separately naming CPI as a formula first.

Approach: Time-based comparison

In the non-pipelined machine, every instruction needs 5 clock cycles, and each cycle lasts \(\dfrac{1}{1.6 \times 10^9}\) seconds \(= 0.625\) ns. So each instruction physically takes:

\(5 \times 0.625 = 3.125\) ns

Now look at the pipelined machine. Under ideal conditions it finishes one instruction every cycle. But since 30 percent of the instructions are delayed by 2 extra cycles (due to hazards like data or control dependencies), on average, one instruction actually costs:

\((0.70 \times 1) + (0.30 \times (1+2)) = 0.70 + 0.90 = 1.6\) cycles

This matches the effective CPI computed differently: 70 percent of instructions cost 1 cycle, and 30 percent cost 3 cycles (1 base + 2 stall), giving the same weighted average of 1.6 cycles per instruction.

Each pipelined cycle lasts \(\dfrac{1}{1.2 \times 10^9} = 0.8333\) ns, so the real time per instruction in the pipelined machine is:

\(1.6 \times 0.8333 = 1.3333\) ns

Speed-up calculation

Speed-up = (time taken by old design) / (time taken by new design), because both execute the same program with the same instruction count:

Speed-up \(= \dfrac{3.125}{1.3333} \approx 2.34\)

This value falls in the accepted range of 2.30 to 2.40, confirming the answer.

Final Answer: 2.34 (accepted range 2.30 to 2.40)

Was this answer helpful?
0

Top Questions on Computer Organization and Architecture


Questions Asked in GATE CS exam