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

Explain about functions of operating system, Q. Explain about Functions of ...

Q. Explain about Functions of Operating System? Functions of Operating System Operating system performs 3 functions as follows: 1.  Convenience:   Operating System mak

List out the advantages of windows 2000 file management, List out the advan...

List out the advantages of windows 2000 file management. Permits detailed security for individual folders and files. Built-in granular compression capabilities

What is the exclusive feature of unix, What is the exclusive feature of UNI...

What is the exclusive feature of UNIX Shell is the exclusive feature of UNIX.

Explain variable partitioning technique, VARIABLE PARTITIONING We can d...

VARIABLE PARTITIONING We can differ the partitions and change the location according to the size of the process. Here if a 10k process enters we are able to make a space of

Explain why sstf scheduling tends to favor middle cylinders, Explain why SS...

Explain why SSTF scheduling tends to favor middle cylinders over the innermost and outermost cylinders. The center of the disk is the location having the fewest average distanc

Explain indexed allocation, Indexed allocation Indexed allocation bring...

Indexed allocation Indexed allocation bringing all the pointers together into one location: the index block. Every file has its own index block, which is an array of disk-block

Dual mode operation, WHAT ARE THE ADVANTAGES AND DISADVANTAGES OF DUAL MODE...

WHAT ARE THE ADVANTAGES AND DISADVANTAGES OF DUAL MODE OPERATION OF OPERATING SYSTEM>?

Cpu, Some CPUs provide for more than two modes of operation. What are two p...

Some CPUs provide for more than two modes of operation. What are two possible uses of these multiple modes?

Explain processing predefined application protocols, Explain Processing Pre...

Explain Processing Predefined Application Protocols Implementing and swift processing of predefined application protocols is sure to improve performance of server - side applic

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