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

What are the disadvantages of linked allocation, What are the disadvantages...

What are the disadvantages of linked allocation? The drawbacks are a. Used only for sequential access of files. b. Direct access is not supported c. Memory space neede

Solve a generalized dining philosopher problem, In this project, you will i...

In this project, you will implement the Chandy and Misra's (CM) algorithm using POSIX Threads (Pthreads).   The algorithm  is a distributed algorithm to solve a generalized dining

Explain hashed page table method, Hashed page table method A general ap...

Hashed page table method A general approach for managing address spaces larger than 32 bits is to use a hashed page table with the hash values being the virtual-page number.

Explain a working of file control block, Explain a working of file control ...

Explain a working of file control block A file control block (FCB) has information about the file, containing ownership, permission, and location of the file contents. The log

Define busy waiting and spinlock, Define busy waiting and spinlock. Whe...

Define busy waiting and spinlock. When a process is in its significant section, any other process that tries to enter its critical section must loop continuously in the entry c

Requirements to satisfied by the critical section problem, What are the req...

What are the requirements to be satisfied by the critical section problem? Following are the necessities to be satisfied by the critical section problem: a)      Mutual exc

Define segmentation, Define Segmentation  The memory allocation method...

Define Segmentation  The memory allocation method subject to “external” fragmentation is Segmentation.

Find the number of drives in the jukebox, Q. In a disk jukebox what would b...

Q. In a disk jukebox what would be the result of having more open files than the number of drives in the jukebox? Answer: Two bad results could result. One likelihood is star

Multiprogramming, ? FREE ASSOCIATION ASSIGNMENTS of multiprograming

? FREE ASSOCIATION ASSIGNMENTS of multiprograming

How does an operating system make multiprogramming possible, How does an op...

How does an operating system make multiprogramming possible by using single processor?

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