Setsuna - CSAPP
type: channel
link: https://www.kok-s0s.top/index.php/tag/CSAPP/
items: Chapter 1 A Tour of Computer Systems

Chapter 1 A Tour of Computer Systems
type: item
date: 2021-04-05T22:30:00+08:00
description: Chapter 1 Amdahl's Law Before speedup |-----------------|----------------------------| $T_{old}$ $(1-\alpha) T_{old}$ $\quad \alpha T_{old}$ After speedup |-----------------|-------------------| $T_{new}$ $(1-\alpha) T_{old}$ $\quad (\alpha T_{old})/k$ $$ \begin{aligned} T_{new} &= (1 - \alpha) T_{old} + (\alpha T_{old})/k \\ &= T_{old}[(1 - \alpha) + \alpha / k] \end{aligned} $$ So,we can compute the speedup $S = T_{old} / T_{new}$ $$ S = \frac{1}{(1 - \alpha) + \alpha / k} $$ when $$ \begin{equation} \begin{cases} \alpha = 0.6 \\ k = 3 \end{cases} \\ \end{equation} $$ get $$ \begin{aligned} S &= \frac{1}{(1 - 0.6) + 0.6 / 3}\\ &=1.67 \times \end{aligned} $$ while $$ \begin{equation} \begin{cases} \alpha = 0.6 \\ k \to +\infty \end{cases} \\ \end{equation} $$ get $$ \begin{aligned} S_{\infty} &= \frac{1}{(1 - \alpha)} \\ &= 2.5 \times \end{aligned} $$ we routinely improve performance by factors of 2 or more. Such high factors can only be achieved by optimizing large parts of a system.