Back to the 2024 paper

Module 3: Pipelining

20247m

A non-pipeline system takes 50 seconds to process a task. The same task can be processed in a six-segment pipeline with a clock cycle of 10 seconds. Determine the speedup ratio of the pipeline for 100 tasks.

Worked SolutionAI Assisted

Solution - Speedup Ratio of Pipeline (Q6a, 2024)

Given:

  • Non-pipeline time per task tn=50t_n = 50 sec
  • Number of pipeline segments k=6k = 6
  • Pipeline clock cycle time tp=10t_p = 10 sec
  • Number of tasks n=100n = 100

1. Time without pipeline (Sequential):
Tnon−pipe=n×tn=100×50=5000 sec T_{non-pipe} = n \times t_n = 100 \times 50 = 5000 \text{ sec}

2. Time with pipeline:
The first task takes k×tpk \times t_p to fill the pipeline, then one task completes every tpt_p.

Tpipe=k⋅tp+(n−1)⋅tp=(k+n−1)⋅tp T_{pipe} = k \cdot t_p + (n-1) \cdot t_p = (k + n -1) \cdot t_p
Tpipe=(6+100−1)×10=105×10=1050 sec T_{pipe} = (6 + 100 - 1) \times 10 = 105 \times 10 = 1050 \text{ sec}

3. Speedup Ratio (SS):
S=Tnon−pipeTpipe=50001050≈4.76 S = \frac{T_{non-pipe}}{T_{pipe}} = \frac{5000}{1050} \approx 4.76

Interpretation:

  • Theoretical maximum speedup = tn/tp=50/10=5t_n / t_p = 50/10 = 5. As n→∞n \to \infty, S→5S \to 5.
  • For n=100n=100, speedup is 4.76, i.e., pipeline is 4.76 times faster than non-pipeline for 100 tasks.
  • Efficiency η=S/k=4.76/6≈0.793\eta = S/k = 4.76/6 \approx 0.793 or 79.3%79.3\%.

Answer: Speedup ≈\approx 4.76 (1050 sec vs 5000 sec). If nn is very large, speedup approaches 5.

Note: If clock cycle were tn/k≈8.33t_n/k \approx 8.33 sec ideally, speedup would approach 6. Here tp=10t_p=10 sec > ideal, so overhead reduces speedup.

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.