14 views
If an instruction takes $1\: nsec$ and a page fault takes an additional $n\: nsec,$ give a formula for the effective instruction time if page faults occur every $k$ instructions.
| 14 views

Assume $\mathbf k$ instructions:

$\mathbf{k-1}$ instructions execution without page fault $= 10 \times (\mathrm k-1) \;\text{nsec}$

$1$ instruction with page fault $= (10+n) \times 1\;\text{nsec}$

$\therefore$ Average is given by the formula $= {(10\times (\mathrm k-1) + 10 +n) \times 1)}{k} = 10 + \dfrac{n}{k} \;\text{nsec}$

by Boss (18.9k points)