Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question: Consider what happens when a page fault occurs. Briefly answer the fol

ID: 3539487 • Letter: Q

Question

Question:

Consider what happens when a page fault occurs. Briefly answer the following questions in a sentence or two.

(a) How does the system decide which page should be brought in?

(b)How does the system decide which page frame should be used for the new page?

(c) What happens to the page that used to be in that page frame?

(d)What system tables must be updated as a result of this operation?

(e) When does paging work? That is, when is the time cost of paging negligible compared to the execution of a program?

Explanation / Answer

Ans:

a) When the page requested is not found in the physical memory,the operating system copies a diskpage into physical memory when an attempt is made to access it.

b)There are different page replacement algorithms that decides which page frame should be replaced by a new page. Each of them employs different policy:

->Optimal Page Replacement : Replaces the page that won%u2019t be needed for the longest time in the future.


-->FIFO replacement : Follows the first in first out policy


-->Least Recently Used Page Replacement

Use the recent past as a predictor of the near future : Replaces the page that hasn%u2019t been referenced for the longest time


c)When a page fault occurs, the operating system has to choose a page to remove from memory to make room for the page that has to be brought in.

If the page to be removed has been modified while in memory, it must be rewritten to

the disk to bring the disk copy up to date.

If, however, the page has not been changed (e.g., it contains program text), the disk copy is already up to date, so no rewrite is needed. The page to be read in just overwrites the page being evicted.


d) Page table and frame table are to be modified.


e) Paging is memory management scheme.

Data is retrieved from storage media by OS, in the same sized blocks called as pages.


Paging allows the physical address space of the process to be non contiguous. The whole program had to fit into storage contiguously.


Paging deals with external fragmentation problem. This is to allow the logical address space of a process to be noncontiguous, which makes the process to be allocated physical memory.


Paging at best when

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote