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 is erd, What is ERD? Entity Relationship Diagram is the graphical ...

What is ERD? Entity Relationship Diagram is the graphical representation of the object relationship pair. It is mostly used in database applications.

Write an equation for this seek time, Q. The accelerating search for descr...

Q. The accelerating search for described in subsequent exercise is typical of hard-disk drives. By contrast floppy disks and several hard disks manufactured before the mid-1980s t

Define approaches that require knowledge of the system state, Define approa...

Define approaches that require knowledge of the system state?  Answer: Deadlock detection, Deadlock prevention, Deadlock Avoidance.

Os structures, #question.explain varios types of system calls..

#question.explain varios types of system calls..

Give an overview of windows 2000 file management, Give an overview of WINDO...

Give an overview of WINDOWS 2000 file management. Windows makes use of the NTFS and File Allocation Table file systems. The Older versions of the FAT file system had file name

File system, what are disadvantages of using single directory

what are disadvantages of using single directory

Define deadlock, Define deadlock. A process requests resources; if the ...

Define deadlock. A process requests resources; if the resources are not available at that time, the process enters a wait state. Waiting processes might be never again change s

Compare user threads and kernel threads, Compare user threads and kernel th...

Compare user threads and kernel threads. User threads:- User threads are supported above the kernel and are executed by a thread library at the user level. Thread creation

Explain deadlock prevention, Deadlock Prevention Prevention is the name...

Deadlock Prevention Prevention is the name given to method that guarantee that deadlocks can never happen for the reason that the way the system is structured. Since 4 conditio

User threads control dispatching, Consider a particular system that does no...

Consider a particular system that does not have an interrupting clock.  The only way a thread can lose the processor is to voluntarily surrender it.  Additionally, the operating sy

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