Life of a page, Operating System

Suppose your process starts up, and allocates some memory with malloc(). The allocator will then give part of a memory page to your process. The OS then updates the corresponding page table entry (PTE), marking the virtual page as valid. If you then try to modify part of that page, only then will the OS actually allocate a physical page, and so the PTE will now be marked as resident. In addition, since the memory has been modi?ed, the PTE will be marked dirty.

If the OS ever needs to evict this page, then, since it is dirty, the OS has to copy that page to disk (i.e. it swaps it, or performs paging). The PTE for the page is still marked valid but is now marked non-resident.

And, if we ever touch that page again (i.e. if we try to read or write it), the OS may have to evict some other page in order to bring our page back into physical memory. One obvious implication of this is that pagefaults are slow to resolve, since disk accesses are performed.

Therefore one possible optimization is for the OS to write dirty pages to disk constantly as an idle background task. Then, when it is time to evict those pages, they will be clean, and the OS won't have to write them to disk. This makes the eviction process much faster.

Posted Date: 3/12/2013 5:53:37 AM | Location : United States







Related Discussions:- Life of a page, Assignment Help, Ask Question on Life of a page, Get Answer, Expert's Help, Life of a page Discussions

Write discussion on Life of a page
Your posts are moderated
Related Questions
Define Latency plus seek time The total time to arrange a disk drive mechanism for a block of data to be read from is its Latency plus seeks time

A paper mill produces two grades of paper viz., X and Y. Because of raw material restrictions, it cannot produce more than 400 tons of grade X paper and 300 ton

Determine the equation for the y and truth table for the circuits

Mention some attractive properties of semaphore?              The Semaphores aren't provided by hardware. However they have numerous attractive properties: Machine indep

What are the hardware and software requirements for virtual memory? The hardware required for virtual memory is a secondary memory and page table. The page table should have th

Explain in detail about ipc in linux

Q. What are the major advantages of the microkernel approach to system design? Answer: Benefits usually include the following (a) Adding a new service doesn't require modify

Q. Explain the File-system manipulation? File-system manipulation there is several details in file allocation, creation, deletion and naming that users should not have to perfo

Question : (a) The dynamic allocation problem is how to satisfy a request of size n from a list of free holes into memory. The best-fit, first-fit and worst-fit strategies are

Explain the ExitThread Function used in the Windows NT ExitThread(ExitCode) The ExitThread( ) call is made to end the currently running thread. If the current thread is th