Consider a system with page fault service time (S) = 100 ns, main memory…
2020
Consider a system with page fault service time (S) = 100 ns, main memory access time (M) = 20 ns, and page fault rate (P) = 65%. Calculate the effective memory access time.
- A.
62 ns
- B.
82 ns
- C.
80 ns
- D.
72 ns
Attempted by 66 students.
Show answer & explanation
Correct answer: D
Concept
Under demand paging, a memory reference either finds its page already resident in main memory or it misses and must wait for the page to be brought in from secondary storage. The page-fault rate P is the probability of a miss. The Effective Memory Access Time (EMAT) is the probability-weighted average of the fast in-memory access and the slow fault-handling path:
EMAT = (1 - P) x M + P x S
Here M is the time for a normal main-memory access and S is the full page-fault service time (the complete cost of fetching the page and restarting the reference). The weights (1 - P) and P sum to 1, so EMAT always lies between M and S, moving toward S as the fault rate rises.
Application
Identify the given values: page-fault rate P = 0.65, main-memory access M = 20 ns, page-fault service time S = 100 ns.
Compute the no-fault contribution: (1 - P) x M = (1 - 0.65) x 20 = 0.35 x 20 = 7 ns.
Compute the fault contribution: P x S = 0.65 x 100 = 65 ns.
Add the two weighted terms: EMAT = 7 + 65 = 72 ns.
Cross-check
Sanity bound: EMAT must fall between M = 20 ns and S = 100 ns, and 72 ns does. Because the fault rate is high (0.65), the result should sit well above the midpoint of M and S and lean toward S, which 72 ns does, confirming the weighting is applied in the right direction.