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

Protection, Can you please explain in easy words how input output protectio...

Can you please explain in easy words how input output protection works

Linux operation system, wat are the commands used for creating the file hie...

wat are the commands used for creating the file hierarchy

10 marks, Differentiate between sequential access and direct access method?...

Differentiate between sequential access and direct access method?

PSEUDO CODE FOR PROGRAM, THE PROGRAM WILL CHOOSE TWO RANDOM NUMBERS,THEN PR...

THE PROGRAM WILL CHOOSE TWO RANDOM NUMBERS,THEN PRINT THEM OUT AS AN ADDITION PROBLEM.THE PROGRAM WILL THEN ASK THE USERTO ENTER THE CORRECT ANSWER.IF THE ANSWER IS CORRECT,THE PRO

Define a election algorithm, Consider a setting where processors are not as...

Consider a setting where processors are not associated with unique identifiers but the total number of processors is known and the processors are organized along a bidirectional ri

Calculate maximum average bandwidth, You have a system with two primary wor...

You have a system with two primary workloads. One performs sequential access to a set of large files, the other performs small, independent, random reads to a separate set of large

Networking and distributed systems, Networks and operating systems have a l...

Networks and operating systems have a lot of overlap. In this course, however,we are not going to discuss networking in detail, but rather focus on the networking abstractions prov

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