Wednesday, 13 May 2015

Q 48,paper 3,J12,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 instructions, is


(A) i + j/k
(B) i + j * k
(C) (i + j)/k
(D) (i + j) * k
Answer A.
Let we have total L instructions. And page fault occurs at every k instructions so total page faults are L/K and rest of instructions are (L-L/K).since page faults take (i+j)instruction time
total instruction time is-- (i+J)*L/k+(i)(L-L/k)
(i+j)*L/K + i*L(k-1)/k
L/K(i+J+ik-i) its effective instruction time is (j+ik)/k. Dividing both sides by K .we have (i+j/k)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.