Other VM Policies
This lesson briefs about some other VM policies that are also related to paging.
We'll cover the following
Page selection policy
Page replacement is not the only policy the VM subsystem employs (though it may be the most important). For example, the OS also has to decide when to bring a page into memory. This policy, sometimes called the page selection policy (
For most pages, the OS simply uses demand paging, which means the OS brings the page into memory when it is accessed, “on demand” as it were. Of course, the OS could guess that a page is about to be used, and thus bring it in ahead of time. This behavior is known as prefetching and should only be done when there is a reasonable chance of success. For example, some systems will assume that if a code page is brought into memory, that code page will likely soon be accessed and thus should be brought into memory too.
Clustering of writes
Another policy determines how the OS writes pages out to disk. Of course, they could simply be written out one at a time; however, many systems instead collect a number of pending writes together in memory and write them to disk in one (more efficient) write. This behavior is usually called clustering or simply grouping of writes and is effective because of the nature of disk drives, which perform a single large write more efficiently than many small ones.
Get hands-on with 1400+ tech skills courses.