108k views
3 votes
Consider an unpipelined machine with 10 nsec clock cycles which uses four cycles for alu operations and branches where as five cycles for memory operation. assume that the relative frequencies of these operations are: 40%, 20%, and 40%, respectively. due to clock skew and setup pipeline let us consider that the machine adds one nsec overhead to the clock. how much speedup is observed in the instruction execution rate when a pipelined machine is considered?

1. 2 times
2. 4 times
3. 6 times
4. 8 times

User Bolov
by
8.0k points

1 Answer

4 votes

Final answer:

The correct answer is option 2, which is 4 times the speedup. The speedup is calculated by comparing the execution times of the average instruction for both an unpipelined and a pipelined machine, considering cycle times and operation frequencies.

Step-by-step explanation:

The correct answer is option 2, which is 4 times the speedup. To calculate the speedup of the instruction execution rate when converting from an unpipelined to a pipelined machine, we must first calculate the average cycle per instruction (CPI) for the unpipelined machine. The CPI can be determined using the relative frequencies and the cycles needed for the respective operations. For ALU operations and branches which use 4 cycles 40% of the time, and for memory operations which use 5 cycles 40% of the time, the average CPI will be:

  • (0.4 * 4) + (0.2 * 4) + (0.4 * 5) = 4.4 cycles.

For an unpipelined machine with a clock cycle of 10 nsec, the average instruction will take 4.4 * 10 = 44 nsec.

In a pipelined machine with an overhead of 1 nsec per cycle, the clock cycle becomes 11 nsec. However, due to pipelining, we expect each stage to be working on a different instruction, theoretically reducing the cycle count per instruction to 1 (ignoring latency and assuming perfect conditions). Therefore, the average instruction takes 11 nsec in the pipeline.

Then the speedup can be calculated as follows:

  • Speedup = Unpipelined execution time / Pipelined execution time
  • Speedup = 44 nsec / 11 nsec = 4

So the speedup is 4 times when a pipelined machine is considered.

User TitusAdam
by
7.9k points