GATE / CS ARCHIVE

SIMILAR QUESTIONS / OPERATING SYSTEMS

Form the two outcome page fault expectation

3 questions solved the same way, newest first. Back to Operating Systems

How these are solved

Use E=(1-p)*resident_latency+p*faulted_access_latency with consistent units and the stated total fault service time. 2000/2011 request effective time;

1 mark · MCQ
Report issue

Page-fault probability from mean access time

Virtual Memory & Paging

Question 10, GATE 2018: A memory access costs M when resident and total D when it faults. Observed mean is X. Find fault rate: A (D−M)/(X−M); B (X−M)/(D−M); C (D−X)/(D−M); D (X−M)/(D−X).
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Method

Partition accesses into the two mutually exclusive outcomes. With fault probability f, their probabilities are f and 1−f, not two independent rates. The weighted mean X=M+f(D−M) interpolates between M at f=0 and D at f=1. These endpoints immediately distinguish the fault probability from C, which is the hit probability. For ordinary D>M, valid observations satisfy M≤X≤D.

Solution

If f is the fault rate, X=(1−f)M+fD=M+f(D−M). Therefore f=(X−M)/(D−M), B, assuming the stated fault access time D is the total fault-case time and D≠M.

Original paper, page 6 · Answer key

1 mark · MCQ
Report issue

Effective memory time with rare page faults

Virtual Memory & Paging

Question 20, GATE 2011: Memory access takes 20 ns on average, a page fault takes 10 ms to service, and one page fault occurs per 10^6 memory accesses. Find the effective access time.

(A) 21 ns
(B) 30 ns
(C) 23 ns
(D) 35 ns
Tap to enlarge
Your answer
Answer & solution

Official answer: B

The fault probability is 10−6 and 10ms=107 ns. Average fault overhead contributes 10 ns per access, in addition to the 20 ns memory time, giving approximately 30 ns, B. If fault service is taken as a replacement rather than added time, the weighted result 29.99998 ns has the same rounded answer.

Convert all units before averaging: 1 ms=106 ns, so the fault penalty is ten million nanoseconds. Although the event is rare, multiplying that large penalty by 1/1000000 adds 10 ns to the average. This is half the normal access time, so ignoring faults because they are rare would be a large relative error. Conversely, adding the full 10 ms to every access would wrongly assume every reference faults.

Original paper, page 5 · Answer key

2 marks · MCQ
Report issue

Effective memory time with rare page faults

Virtual Memory & Paging

Question 2.22, GATE 2000: Memory access takes 1 μs, average page-fault service 10 ms, and hit ratio is 99.99%. Choose effective time from 1.9999 ms,1 ms,9.999 μs,1.9999 μs.
Tap to enlarge
Your answer
Answer & solution

Answer: D under the inclusive fault-service convention (no official key was published)

Step 1: Convert 10 ms to 10,000 μs and use fault probability 1−0.9999=0.0001.

Step 2: If the fault-case time is the stated total service, expected time is 0.9999·1+0.0001·10,000=0.9999+1=1.9999 μs, D.

If “service” excludes the final retried access, add another 0.0001 μs to obtain 2 μs. This tiny convention difference is explicit; neither interpretation gives a millisecond-scale average.

Original paper, page 6