If an instruction takes i microseconds and a page fault takes an additional j…

1998

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

  1. A.

    i + j/k

  2. B.

    i + j * k

  3. C.

    (i + j)/k

  4. D.

    (i + j) * k

Attempted by 14 students.

Show answer & explanation

Correct answer: A

The normal execution time of each instruction is i microseconds. A page fault adds j microseconds, but it occurs only once every k instructions on average. Therefore, the extra page-fault overhead per instruction is j/k microseconds. Effective instruction time = normal instruction time + average page-fault overhead = i + j/k.

Explore the full course: Gate Guidance By Sanchit Sir