GATE | GATE CS 2018 | Question 17
Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is available in memory, and D units if the memory access causes a page fault. It has been experimental measured that the average time taken for a memory access in the process is X units.
Which one of the following is the correct expression for the page fault rate experienced by the process?
(A) (D – M) / (X – M)
(B) (X – M) / (D – M)
(C) (D – X) / (D – M)
(D) (X – M) / (D – X)
Explanation: Given, average time for a memory access = M units if page hits, and average time for a memory access = D units if page fault occurred.
And total/experimental average time taken for a memory access = X units.
Let page fault rate is p. Therefore,
Average memory access time = ( 1 – page fault rate) * memory access time when no page fault + Page fault rate * Memory access time when page fault
→ X = (1 – p)*M + p*D = M – M*p + p*D
→ X = M + p(D – M)
→ (X – M) = p(D – M)
→ p = (X – M) / (D – M)
So, option (B) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.