Back to the 2022 paper

Module 2: x86 Architecture, CPU Control, I/O, Memory System Design

202214m

Let a be the percentage of a program code that can be executed simultaneously by nn processors in a computer system. Assume that the remaining code must be executed sequentially by a single processor. Each processor has an execution rate of xx MIPS.

(a) Derive an expression for the effective MIPS rate when using the system for exclusive execution of this program, in terms of nn, α\alpha, and xx.

(b) If n=16n=16 and x=4x=4 MIPS, determine the value of that will yield a system performance of 40 MIPS.

Worked SolutionAI Assisted

Amdahl's Law – Effective MIPS with n Processors (14 Marks)

Let α\alpha = fraction of code parallelizable (executable on nn processors simultaneously), so (1−α)(1-\alpha) is strictly sequential. Each processor rate = xx MIPS.

Let total instructions = II.

(a) Derivation:

Time if executed on single processor: T1=IxT_1 = \frac{I}{x} (in μs\mu s if xx in MIPS, i.e., 10610^6 instr/sec)

With nn processors:

  • Sequential part: (1−α)I(1-\alpha)I instructions at rate xx → Tseq=(1−α)IxT_{seq}= \frac{(1-\alpha)I}{x}
  • Parallel part: αI\alpha I instructions shared among nn processors, effective rate n⋅xn\cdot x → Tpar=αInxT_{par}= \frac{\alpha I}{n x}

Total parallel time: Tn=Tseq+Tpar=Ix[(1−α)+αn]T_n = T_{seq}+T_{par}= \frac{I}{x}\left[(1-\alpha)+\frac{\alpha}{n}\right]

Effective MIPS Meff=ITn=IIx[(1−α)+α/n]=x(1−α)+α/nM_{eff}= \frac{I}{T_n} = \frac{I}{\frac{I}{x}[(1-\alpha)+\alpha/n]} = \frac{x}{(1-\alpha)+\alpha/n}

So Meff=x(1−α)+αn=nxn(1−α)+αM_{eff}= \frac{x}{(1-\alpha)+\frac{\alpha}{n}} = \frac{n x}{n(1-\alpha)+\alpha}

This is Amdahl's law: Speedup S=T1Tn=1(1−α)+α/nS = \frac{T_1}{T_n}= \frac{1}{(1-\alpha)+\alpha/n}, and Meff=x⋅SM_{eff}=x\cdot S.

Checks: If α=0\alpha=0 → Meff=xM_{eff}=x (no gain). If α=1\alpha=1 → Meff=nxM_{eff}=n x (linear). If n→∞n\to\infty → Meff→x1−αM_{eff}\to \frac{x}{1-\alpha} (bottleneck by sequential part).

(b) Numerical:

Given n=16n=16, x=4x=4 MIPS, Meff=40M_{eff}=40 MIPS. Find α\alpha.

40=4(1−α)+α/1640 = \frac{4}{(1-\alpha)+\alpha/16}

(1−α)+α/16=440=0.1(1-\alpha)+\alpha/16 = \frac{4}{40}=0.1

1−α+0.0625α=0.11-\alpha+0.0625\alpha =0.1

1−0.9375α=0.11-0.9375\alpha =0.1

0.9375α=0.90.9375\alpha =0.9

α=0.90.9375=0.96\alpha = \frac{0.9}{0.9375}=0.96

α=96%\alpha = 96\%

Interpretation: 96% of code must be parallelizable to achieve 40 MIPS (≈10× speedup) with 16×4 MIPS processors. If α\alpha lower, cannot reach 40 MIPS even with infinite processors (max would be x/(1−α)x/(1-\alpha)).

Similar questions

Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.