A demand paging system takes 100 time units to service a page fault and 300…
2007
A demand paging system takes 100 time units to service a page fault and 300 time units to replace a dirty page. Memory access time is 1 time unit. The probability of a page fault is p. In case of a page fault, the probability of page being dirty is also p. It is observed that the average access time is 3 time units. Then the value of p is
- A.
0.0194
- B.
0.233
- C.
0.514
- D.
0.981
Attempted by 62 students.
Show answer & explanation
Correct answer: A
Key formula: Average access time (EAT) = (1 − p) × memory access time + p × (expected service time on a page fault).
Interpretation 1 (common): If a page fault costs 100 time units when the evicted page is not dirty, and when the evicted page is dirty an additional 300 time units are needed (so dirty fault costs 100 + 300 = 400). The probability the faulted page is dirty (conditional on a fault) is p.
Expected service time on a fault = 100 + 300 p. Therefore
EAT = (1 − p)·1 + p·(100 + 300 p) = 1 + 99 p + 300 p².
Set EAT = 3: 300 p² + 99 p − 2 = 0. Solving gives p = (−99 + √12201) / 600 ≈ 0.01910.
Interpretation 2 (alternate but also common): If the service time is 100 when not dirty and 300 when dirty (not additive), expected service = 100 + 200 p.
EAT = (1 − p)·1 + p·(100 + 200 p) = 1 + 99 p + 200 p².
Set EAT = 3: 200 p² + 99 p − 2 = 0. Solving gives p = (−99 + √11401) / 400 ≈ 0.01943.
Conclusion: Both reasonable interpretations produce p ≈ 0.0191–0.0194 (about 0.0192).