recategorized by
26,363 views
67 67 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}$

12 Answers

Best answer
87 87 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
23 23 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

17 17 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 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.
2 2 votes
1 instruction takes i ms.

k instructions will take k*i ms.

1 page fault in every k instructions. Page Fault Service Time is j ms.

So,

Total time required to execute k instructions is (k*i+j) ms.

 

so here ,

Effective instruction time = (k*i+j)/k

i.e, i + j/k
Answer:
Position:
Show:

Related questions

41 41 votes
3 answers 3 answers
15.4k
15.4k views
Kathleen asked Sep 14, 2014
15,385 views
Consider a schema $R(A,B,C,D)$ and functional dependencies $A \rightarrow B$ and $C \rightarrow D$. Then the decomposition of R into $R_1 (A,B)$ and $R_2(C,D)$ isdependen...
88 88 votes
7 answers 7 answers
38.1k
38.1k views
Rucha Shelke asked Sep 26, 2014
38,117 views
A computer system supports $32$-bit virtual addresses as well as $32$-bit physical addresses. Since the virtual address space is of the same size as the physical address ...
57 57 votes
8 8 answers
18.4k
18.4k views
Ishrat Jahan asked Nov 3, 2014
18,362 views
A user level process in Unix traps the signal sent on a Ctrl-C input, and has a signal handling routine that saves appropriate files before terminating the process. When ...
13 13 votes
3 answers 3 answers
15.3k
15.3k views
Kathleen asked Sep 22, 2014
15,294 views
A common property of logic programming languages and functional languages is:both are procedural languages both are based on $\lambda$-calculusboth are declarativeboth us...