简体   繁体   中英

Paging when physical memory pressure is low

I was reading Fundamentals of Garbage Collection that I encountered to the following paragraph

Your page file is used even if physical memory pressure (that is, demand for physical memory) is low. The first time your physical memory pressure is high, the operating system must make room in physical memory to store data, and it backs up some of the data that is in physical memory to the page file. That data is not paged until it is needed, so it is possible to encounter paging in situations where the physical memory pressure is very low.

which I found it very confusing,

shouldn't we back-up and do the actual paging during high pressure situation?

what is the advantage of only backing-up and preparing the page file but not actually paging it?

it would be great if somebody could describe the situation in more detail and less ambiguous way.

The idea is that while the disk is otherwise idle, seldom-accessed memory can be copied to disk, but the in-memory copy is kept.

If higher memory pressure then leads to an eviction of the page, the transfer to disk has already happened, so all that is left is adjusting the mapping and clearing the page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM