Virtual memory paging page replacement?

Nov 10, 2021 at 6:05pm
With regard to virtual memory paging page replacement, can anyone explain to me why referenced but not 'modified' pages might be replaced before referenced and 'modified' pages? Just a few short sentences please.
Nov 10, 2021 at 6:22pm
is this a paging strategy question?
an unmodified page in memory does not need to be written, it can just be tossed out. if it is modified the new values have to be copied back to the original source (ram? usually?) which takes some time. So its less impactful to throw away the untouched data than to write back.
Nov 11, 2021 at 10:11am
There's also the concept of LRU (least recently used) when deciding which pages to remove. A frequent accessed non-modified page could be a better bet to keep than a modified but in-frequent used page. You have to look at the impact of reading the page back into memory - which might mean another page being replaced which might have to be brought back into memory... There is a concept of 'thrashing' (reading back what has been replaced) which can seriously impact performance if not recognised.
Topic archived. No new replies allowed.