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
Q. Multithreading is a commonly utilized programming technique. Illustrate three different ways that threads could be implemented. Describe how these ways compare to the Linux clon

When you run a program on your UNIX system, the system prepares a special environment for that program. This environment owns everything needed for the system to execute the progra

Describe the internal layout of the file system in windows 2000. The basic entity in NTFS is a volume and a volume is created by the Windows 2000 disk administrator utility and

Q. Several CPUs provide for more than two modes of operation. What are two probable uses of these multiple modes? Answer: Although most systems merely distinguish between use

Clustered file organization A clustered file is also called a B-tree-clustered file is a tree-structured file in which records with adjacent index values are clustered toget

Q. What are two dreadful problems that designers should solve to implement a network-transparent system? Answer: One such issue is making all the processors as well as storag

explain how response time are reduced by allowing time sharing on top of multiprogramming

What problems arise if the directory structure is a general graph? Searching for a particular file may result in searching the similar directory many times. Deletion of the fil

Difference between threads and processes 1. Thread is flow of implementation. Process is group of instruction which is alike to that of a program except which may be stopped an

Question: a) Each process is represented in the operating system by a process control block (PCB). The PCB contains many pieces of information associated with a specific proce