31.1k views
4 votes
Consider a system with a two-level paging scheme in which a regular memory access takes nanoseconds, and servicing a page fault takes milliseconds. An average instruction takes nanoseconds of time and two memory accesses. The hit ratio is %, and the page fault rate is one in every instructions. What is the effective average instruction execution time?

1 Answer

2 votes

Final answer:

To calculate the effective average instruction execution time, consider the time for regular memory access, servicing a page fault, hit ratio, and page fault rate.

Step-by-step explanation:

To calculate the effective average instruction execution time, we need to consider the time required for regular memory access, servicing a page fault, and the hit ratio and page fault rate. Let's break down each component:

  1. Time for regular memory access: nanoseconds
  2. Time for servicing a page fault: milliseconds
  3. Average time for an instruction: nanoseconds
  4. Number of memory accesses per instruction: 2
  5. Hit ratio: % (decimal)
  6. Page fault rate: one in every instructions

To calculate the effective average instruction execution time, we can use the following formula:

Effective Average Instruction Execution Time = Time for regular memory access + (Hit ratio * (Time for regular memory access * Number of memory accesses per instruction)) + (Page fault rate * (Time for servicing a page fault + (Time for regular memory access * Number of memory accesses per instruction)))

Now you can substitute the given values into the formula and calculate the effective average instruction execution time.

User Adaephon
by
8.1k points