Consider a 5-segment pipeline with a clock cycle time 20 ns in each sub…

2020

Consider a 5-segment pipeline with a clock cycle time 20 ns in each sub operation. Find out the approximate speed-up ratio between pipelined and non-pipelined system to execute 100 instructions. (If an average, every five cycles, a bubble due to data hazard has to be introduced in the pipeline.).

  1. A.

    5

  2. B.

    4.03

  3. C.

    4.81

  4. D.

    4.17

Attempted by 47 students.

Show answer & explanation

Correct answer: B

First, calculate the time taken by a non-pipelined system. Each instruction takes 5 stages × 20 ns = 100 ns. For 100 instructions, total time is 100 × 100 ns = 10,000 ns. Next, calculate the pipelined time. Ideally, 100 instructions take (100 + 5 - 1) = 104 cycles. However, a bubble occurs every 5 instructions. For 100 instructions, there are approximately 20 stalls (bubbles). Total cycles = 104 + 20 = 124 cycles. Pipelined time is 124 × 20 ns = 2,480 ns. Finally, the speedup ratio is Non-Pipelined Time / Pipelined Time = 10,000 / 2,480 ≈ 4.03.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro