Project ForgeSign up free
Computer Organization & Architecture
Pipelining & Instruction Sets
GATE 2020
Expert

Consider a non-pipelined processor operating at 2.5 GHz. It takes 5 clock cycles to complete an instruction. You are going to make a 5-stage pipeline out of this processor. Overheads associated with pipelining force you to operate the pipelined processor at 2 GHz. In a given program, assume that 30% are memory instructions, 60% are ALU instructions and the rest are branch instructions. 5% of the memory instructions cause stalls of 50 clock cycles each due to cache misses and 50% of the branch instructions cause stalls of 2 cycles each. Assume that there are no stalls associated with the execution of ALU instructions. For this program, the speedup achieved by the pipelined processor over the non-pipelined processor (round off to 2 decimal places) is ____.

2.16(± 0.03 accepted)

Explanation

Non-pipelined: cycle time = 1/2.5GHz = 0.4 ns, instruction time = 5×0.4 = 2 ns. Pipelined: cycle time = 1/2GHz = 0.5 ns, base CPI = 1. Extra average stall cycles: memory (30% × 5% × 50 cycles) = 0.75, branch (10% × 50% × 2 cycles) = 0.10 (ALU contributes 0 stalls). Average CPI = 1 + 0.75 + 0.10 = 1.85. Pipelined instruction time = 1.85 × 0.5 = 0.925 ns. Speedup = 2 / 0.925 ≈ 2.16.

Source: GATE CS 2020 (2020)

This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.

Start revising free