Life of a page, Operating System

Assignment Help:

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.


Related Discussions:- Life of a page

Define tii stands for, TII stands for The abbreviation of TII is Table o...

TII stands for The abbreviation of TII is Table of incomplete instructions.

What is the use of the command interpreter, Q. What is the use of the comma...

Q. What is the use of the command interpreter? Why is it generally separate from the kernel? Answer: It reads commands from the user or else from a file of commands and execu

Explain the types of system calls, Explain the Types of System Calls Th...

Explain the Types of System Calls The major types of system calls are like this: a. Process Control: These types of system calls are employed to control the processes.

Define swapping, Define swapping. A process requires being in memory to...

Define swapping. A process requires being in memory to be executed. Though a process can be swapped temporarily out of memory to a backing store and then brought back into memo

Components of the r/e system, What components of the R/e system initiate th...

What components of the R/e system initiate the start of background jobs at the specified time? The batch scheduler initiates the begin of background job.  The dispatcher then s

Explain the overlay structured program, Overlay structured program: A p...

Overlay structured program: A program consisting of overlays is referred as overlay structured program in which an overlay is a part of program which has similar load origin as

Identifying parallelism, Identifying parallelism A formal way to identi...

Identifying parallelism A formal way to identify parallelism in an activity is to draw a task dependence graph in a directed graph in which each vertex represents a task to

Write a short note about the different states of a process, Write a short n...

Write a short note about the different STATES of a process. As a process implement it changes state. The state of a process is described in part by the current activity of that

Why high level languages need compiler, Q. Why High level languages need Co...

Q. Why High level languages need Compiler? High level languages - illustrations are COBOL, FORTRAN, PL/I andALGOL - are processed by interpreters andcompilers. A compilers is a

Explain contiguous allocation, Contiguous allocation The contiguous-all...

Contiguous allocation The contiguous-allocation method needs each file to occupy a set of contiguous blocks of the disk. Disk addresses explain a linear ordering on the disk. T

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd