The Gateway to Computer Science Excellence

+29 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$

$\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.

0

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.

+1

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

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

= i+j/k Ans

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

= i+j/k Ans

+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".

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".

+10 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 k^{th }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

+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.

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.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.5k
- Others 1.5k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,647 questions

56,466 answers

195,381 comments

100,308 users