Let the page fault service time be 10ms in a computer with average mem...
Let P be the page fault rate
Effective Memory Access Time
= p * (page fault service time) + (1 - p) * (Memory access time)
= ( 1/(10^6) )* 10 * (10^6) ns +(1 - 1/(10^6)) * 20 ns
= 30 ns (approx)
Let the page fault service time be 10ms in a computer with average mem...
Calculation:
Let us assume the following:
Memory access time = 20ns
Page fault service time = 10ms
Probability of a page fault = 1/10^6
Effective Access Time = (1 - p) x Memory access time + p x Page fault service time
Where p is the probability of a page fault.
Now, substituting the values in the above formula, we get:
Effective Access Time = (1 - 1/10^6) x 20ns + (1/10^6) x 10ms
= 0.999999 x 20ns + 0.000001 x 10ms
= 20.000018ns
Therefore, the effective access time for the memory is 30ns (approximately).
Explanation:
Page fault occurs when the requested page is not present in the main memory and needs to be fetched from the secondary memory. Page fault service time is the time taken to service a page fault, i.e., the time taken to fetch the requested page from the secondary memory and load it into the main memory.
In this question, we are given the memory access time, page fault service time, and the probability of a page fault. Using these values, we can calculate the effective access time for the memory.
The effective access time is the average time taken to access a memory location, taking into account the possibility of a page fault. It is calculated as a weighted average of the memory access time and the page fault service time, where the weights are the probabilities of a page hit and a page fault, respectively.
In this case, the probability of a page fault is 1/10^6, as given in the question. Therefore, the effective access time is dominated by the memory access time, and the impact of the page fault service time is negligible. This is why the effective access time is only slightly higher than the memory access time, i.e., 30ns (approximately).