Evicting pages from physical memory, Operating System

Assignment Help:

When do we write a page from physical memory back to the disk?

In general, caches have two broad types of writing policies. One approach is a write-through cache. In this case, when a value in the cache is written, it is immediately written to the backing store as well (in this case, the disk). The cache and backing store are always synchronized in this case, but this can be very slow. The other main approach is a write-back cache. In this case, the backing store and the cache are sometimes out of sync, but this approach is much faster. This is what is used with paging, for obvious speed reasons.

When a page is loaded from the disk to physical memory, it is initially clean, i.e. the copy in physical memory matches the copy on disk. If the copy in memory is ever changed, then its page-table entry is marked dirty, and it will need to be written back to the disk later. When physical memory ?lls up, and a non-resident page is requested, then the OS needs to select a page to evict, to make room for the new page. The evicted page is called the victim, and is saved to the so-called "swap" space.

The swap space is a separate region of the disk from the ?le system, and the size of the swap space limits the total virtual address space of all programs put together (though in practice, there is a lot of memory shared between processes, for instance shared libraries). There are a variety different strategies for choosing which page to evict, with tradeoffs for each strategy. These strategies will be discussed later. One thing to note is that evicting a clean page is fast, since it doesn't need to be written back to the disk. A second note is that to speed up the process of evicting pages, the OS can write dirty pages back to disk as a background task. In this way, more pages will be clean and can therefore be evicted a lot more quickly, when it is time to do so.


Related Discussions:- Evicting pages from physical memory

What are the operations of processes, What are the operations of processes?...

What are the operations of processes? Process creation A process may create several new processes. The creating process is called as parent process, where as the new proce

Address operator and pointers, We are use to using variables within C witho...

We are use to using variables within C without thinking about where they are stored. Most variables are dynamic i.e. can change, therefore they are stored in Ram, unlike a program

Describe the actions of sun ultra sparc processor, Q. The Sun Ultra SPARC p...

Q. The Sun Ultra SPARC processor has numerous register sets that describe the actions of a context switch if the new context is previously loaded into one of the register sets. Wha

Explain second-chance algorithm, Second-Chance algorithm When a page ha...

Second-Chance algorithm When a page has been selected, we inspect its reference bit. If the value is 0, we proceed to replace this page. If the reference bit is set to 1, thoug

Explain virtual file systems, Virtual file systems The file-system exec...

Virtual file systems The file-system execution having of three major layers. The first layer is the file-system interface, based on the open, read, write and close calls and fi

Compute the effective instruction time on the system, Q. An operating syst...

Q. An operating system sustains a paged virtual memory using a central processor with a cycle time of 1 microsecond. It costs an additional one microsecond to access a page other

Unsafe state, discuss unsafe state in operating system

discuss unsafe state in operating system

Explain the demand paging system, Question : (a) In the demand paging ...

Question : (a) In the demand paging system, when a process tries to access a page that was not brought into memory, a page fault occurs that involves a series of actions. The

What is segmentation?, SEGMENTATION In a memory management system that ...

SEGMENTATION In a memory management system that is properly a programmer views a program to be collection of program components called as segments . Every segment is a logical

Define the global vs. local variables, Define the Global vs. local variable...

Define the Global vs. local variables It is also important to discuss the scope of resources being granted to the application program.  Variable scoping is defined as the acces

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