It should be 1 instead of 10... i think.

1 vote

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.

0 votes

$\underline{\textbf{Answer:}\Rightarrow}$

$\underline{\textbf{Explanation:}\Rightarrow}$

Assume $\mathbf k$ instructions:

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

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

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

$\underline{\textbf{Explanation:}\Rightarrow}$

Assume $\mathbf k$ instructions:

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

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

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