Question 3731 – Operating-SystemsNovember 16, 2023
Question 3752 – Operating-SystemsNovember 17, 2023
Suppose that the number of instructions executed between page fault is directly proportional to the number of page frames allocated to a program. If the available memory is doubled, the mean interval between page faults is also doubled. Further,
consider that a normal instruction takes one microsecond, but if a page fault occurs, it takes 2001 microseconds. If a program takes 60 sec to run, during which time it gets 15,000 page faults, how long would it take to run if twice as much memory were
Correct Answer: C
→ Instruction with page fault takes 2001 microseconds so page fault takes additional 2000 microsecond
→ The given program takes 60 sec to run and in that program there were 15000 p.f
→ Since time taken by 1 page fault is 2000 microseconds, time taken by all 15000 page faults = 15000*2000 microseconds
→ Out of overall 60 sec of the program time 30 sec are taken for page faults, remaining 30 sec are consumed by program execution.
→ If memory is doubled we will have more memory available to hold the pages and hence page faults also reduce. It is given in the question that “if memory is doubled then the mean interval between the page faults is also doubled” this is nothing but “number of page faults will be reduced by half”.
→ Earlier 30 sec were needed by program instructions and 30 sec for page faults.
→ Now program execution takes 30 sec and page fault will take only 15 sec.
So new total time =30+15