recategorized by
19,195 views
47 votes
47 votes

If an instruction takes $i$ microseconds and a page fault takes an additional $j$ microseconds, the effective instruction time if on the average a page fault occurs every $k$ instruction is:

  1. $i + \dfrac{j}{k}$

  2. $i +(j\times k)$

  3. $\dfrac{i+j}{k}$

  4. $({i+j})\times {k}$

recategorized by

9 Answers

Best answer
61 votes
61 votes

Page fault rate $=\dfrac{1}{k}$
Page hit rate $=1-\dfrac{1}{k}$
Service time $=i$
Page fault service time $= i+j$

Effective memory access time,

$\quad =\dfrac{1}{k}\times (i+j)+\left(1-\dfrac{1}{k}\right)\times i$

$\quad=\dfrac{(i+j)}{k}+i-\dfrac{i}{k}$

$\quad=\dfrac{i}{k}+\dfrac{j}{k}+i-\dfrac{i}{k}$

$\quad=i+\dfrac{j}{k}$

So, option (A) is correct.

edited by
20 votes
20 votes

Lets take a example

no of instruction =6

i=4(Normal instrction execution time)

j=2(Additional time incase of page fault)

k=3(Page fault occurs on every kth instruction)

Total time required=4+4+(4+2)+4+4+(4+2)=28

Average time=28/6=4.66

Now substitute the i,j,k values in options 

i+j/k=4+2/4=4.66

so A is the answer

16 votes
16 votes
Here, given that On an average page fault occurs at every 'k' seconds. So, probability of getting a page fault is (1/k).

 

Effective Instruction Time = Normal instruction execution Time + Average Page Fault Service Time

i.e. Avg Page Fault Service Time = prob. of getting page fault * page fault service time =(1/k )* j

 

so its "i + (1/k)*j".
5 votes
5 votes
One more way could be. Let us we have 100 instruction then page fault will occur 100/k times. So

Total execution time  = 100*i +  (100/k)*j

So avg execution time  = (Total execution time)/(Total number of instruction) = i + (j/k).

 

Answer is (A) Part.
Answer:

Related questions