Log In
29 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}$

in Operating System
recategorized by
T = [ (1)(i+j) + (k-1)(i) ] / k = (ik + j)/k

8 Answers

38 votes
Best answer

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$




So, option (A) is correct.

edited by
thats the beauty of gate .... nice ans ...

since each instruction takes i microseconds and a page fault occurs after k instructions. so after ki microseconds, 1 page fault occurs.

in ki time, 1 page fault

in 1 time, i/ki page fault

so doesn't this make the rate as 1/ki  ???

My question is here.

Okay then : total time to execute k instructions= ik + j

                         so effective instruction time = (ik+j)/k

                                                                       = i+j/k     Ans

I think 

page fault takes an additional $j$

making the access hierarchical. Right? Also,  there seems to be no option for simultaneous... 

Yes..." page fault takes an additional j microseconds"  makes it hierarchical acesss
12 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".
12 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 


so A is the answer

Good One

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.
4 votes
ans a)
3 votes

Consider k instructions: 

instruction # 1 2 3 ... k
time i i i ... i+j

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

1 vote
One more way we can do is as follows


EMAT= m+p(ps)...{y=mx+c}



1 vote
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.


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

Related questions

21 votes
2 answers
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)$ is dependency preserving and lossless join lossless join but not dependency preserving dependency preserving but not lossless join not dependency preserving and not lossless join
asked Sep 14, 2014 in Databases Kathleen 2.6k views
48 votes
5 answers
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 space, the operating system designers decide to get rid of the virtual memory entirely. ... can be made more efficient now Hardware support for memory management is no longer needed CPU scheduling can be made more efficient now
asked Sep 26, 2014 in Operating System Rucha Shelke 9.2k views
12 votes
4 answers
A counting semaphore was initialized to $10$. Then $6 P$ (wait) operations and $4V$ (signal) operations were completed on this semaphore. The resulting value of the semaphore is $0$ $8$ $10$ $12$
asked Sep 26, 2014 in Operating System Kathleen 5.6k views
26 votes
1 answer
When the result of a computation depends on the speed of the processes involved, there is said to be cycle stealing race condition a time lock a deadlock
asked Sep 26, 2014 in Operating System Kathleen 3.5k views