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
Question: a) Windows Server 2003 has brought great enhancements the Server System as compared to the previous version. Write down short notes on the below listed enhancements.

With software algorithms for mutual exclusion, such as Dekker's algorithm, Peterson's algorithm, or Lamport's bakery algorithm, note that optimizing compilers and out-of-order exec

Ask question Project Details PROJECT OVERVIEW The ABC Hospital is upgrading their version of Windows. As part of the upgrade, 100 new computers will be purchased. Your task is to

wat are the commands used for creating the file hierarchy

Q. Likewise some systems support many types of structures for a file's data while others simply support a stream of bytes. What are the merits in addition to demerits? Answer:

Paging full question

Major page fault: If the page is not loaded in memory at the time the fault is stated, then it is named major or hard page fault. The handler in the machine requires to search a

Differentiate between sequential access and direct access method?

Problem 1: (a) The grouping of organisational activities (usually into ‘departments' or larger ‘divisions') can be done in different ways. Outline 7 criteria which can be used

What is low-level formatting? Before a disk can kept data, it must be required into sectors that the disk controller can read and write. This procedure is called low-level form