---
title: "Pipeline speedup ratio derivation"
subject: "Computer Organization and Architecture"
chapter: 4
key: "semester_5/computer_organization_and_architecture:pipeline-speedup-ratio"
source: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/pipeline-speedup-ratio
site: BCT Engineering
---

# Pipeline speedup ratio derivation

Computer Organization and Architecture · Chapter 4: Pipeline & Vector Processing

- Asked in: 2075 Chaitra, 3 marks
- Video: [Pipeline Performance](https://www.youtube.com/watch?v=apz1qL7jDeQ) — Semesters Simplified
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/pipeline-speedup-ratio
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_organization_and_architecture/chapter-4

## Question

Derive the expression showing that the speed up ratio equals the number of segments in a pipeline.

## Short answer

For a k-segment pipeline, n tasks take (k+n-1) clock cycles while non-pipelined takes n*k. Speedup S = n*k/(k+n-1). As n becomes large, S ≈ k, so the maximum speedup equals the number of pipeline segments.

## Answer

Let a pipeline have k segments, each taking one clock time tp, and let n tasks be executed.

- Time for one task in a non-pipelined unit: tn = k · tp (all segments done in series).
- Time for n tasks without pipeline: T1 = n · tn = n · k · tp.
- Time for n tasks with pipeline: the first task takes k·tp, each of the remaining n - 1 comes out one clock later: T2 = (k + n - 1) · tp.

Speedup ratio:

```text
 S = T1 / T2 = n·k·tp / ((k + n - 1)·tp) = n·k / (k + n - 1)
```
When the number of tasks is very large (n >> k − 1), k + n − 1 ≈ n, so

```text
 S = n·k / n = k
```
So the maximum speedup equals the number of segments k. Example: k = 4, n = 100: S = 400/103 = 3.88 ≈ 4. (Assumes tn = k·tp, equal segment times and no stalls.)

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Time for n tasks without pipelining is:
   A. (k + n - 1) tp
   B. n·k·tp
   C. n·tp
   D. k·tp
   Answer: B. Each task takes tn = k·tp in series, so n tasks take n·k·tp. (Key point: Non-pipelined time)

2. Why is the pipelined time (k + n - 1) tp?
   A. The first task takes k·tp and each of the other n - 1 finishes one clock later
   B. Every task takes k·tp
   C. All tasks finish together after n·tp
   D. The last task takes k - n clocks
   Answer: A. k clocks for the first plus n - 1 further clocks. (Key point: Pipelined time)

3. Why does S = n·k/(k + n - 1) become k?
   A. For n >> k - 1, k + n - 1 is approximately n so n cancels
   B. Because k = n
   C. Because tp cancels n
   D. Because n is zero
   Answer: A. With very large n, S = n·k/n = k, the maximum, assuming equal segment times and no stalls. (Key point: Limit of speedup)

## Related in other subjects

- [Parallel processing and pipeline speedup](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Aparallel-processing-pipeline-speedup) — Microprocessor, chapter 6
- [Slope of string equals speed ratio](https://www.bctengineer.com/question.md?key=semester_1%2Fengineering_physics%3Astring-wave-slope-speed-ratio) — Engineering Physics, chapter 2
- [Minimum number of commutator segments](https://www.bctengineer.com/question.md?key=semester_5%2Felectric_machine_design%3Adc-minimum-commutator-segments) — Electric Machine Design, chapter 5, asked 2×
- [Derivation of superelevation expression](https://www.bctengineer.com/question.md?key=semester_6%2Ftransportation_engineering_i%3Asuper-derive) — Transportation Engineering I, chapter 3, asked 7×
