Let be the number of accesses, the miss count and the number of dirty-victim page writebacks. Assume every requested memory page has a backing copy, every miss reads it, writes modify only part of its contents, transfers succeed and occur serially, and there is no background or final flushing. With common access cost , additional load cost per miss, and additional outgoing write cost per dirty victim, an illustrative total service time is
Bookkeeping and other operating system costs are omitted. The two transfer directions are separate: a miss can require a read with no write, or both a victim write and a requested-page read. A retained dirty memory page contributes no outgoing write to this finite-page-reference trace count until evicted. Future flushing would need its own accounting boundary.
For three-page frame FIFO page replacement on the displayed page-reference trace, all reads give . Change only access 1 to a partial write of memory page 1. Its initial miss still loads the old contents, the write marks it dirty, and eviction at access 4 adds exactly one page writeback. Later loads of memory page 1 are clean because the remaining accesses read. The result is : identical residency and nine misses, but one extra outgoing write. With illustrative nanoseconds, millisecond and milliseconds, total service time changes from to milliseconds. These are model costs, not hardware measurements.
Preferring a clean victim can save an immediate page writeback, but evicting a soon-needed clean memory page can add later misses. This tradeoff is why a miss-minimizing optimal page replacement benchmark and a minimum-cost policy are different questions. Real page faults can also initialize a new memory page or perform copy-on-write without reading backing storage; those cases require different load costs.
// Destination: computer-science.bigb

There are no discussions about this article yet.

Articles by others on the same topic (NaN)

There are currently no matching articles.