Home

pagereplacement

Pagereplacement is a memory management mechanism used by operating systems that support virtual memory. It decides which pages residing in physical memory should be evicted to make room for a page that is not currently in memory. The goal is to minimize the total number of page faults and the cost of handling them while maintaining acceptable performance for running processes.

When a reference to a page that is not in physical memory occurs, a page fault is

Common page replacement algorithms include first-in, first-out (FIFO), which evicts the oldest loaded page; least recently

Replacement decisions interact with hardware features such as the translation lookaside buffer (TLB) and the page

Other considerations include working-set models, frame allocation policies, and page pinning in real-time systems. Page replacement

raised.
The
replacement
policy
selects
a
candidate
page
to
evict,
and
the
OS
writes
dirty
pages
back
to
disk
if
necessary
before
loading
the
requested
page
into
a
free
frame.
The
decision
is
influenced
by
workload,
access
patterns,
and
the
available
number
of
physical
frames.
used
(LRU),
which
targets
pages
not
used
for
the
longest
time;
and
optimizations
of
LRU
such
as
the
CLOCK
and
second-chance
algorithms.
The
optimal
page
replacement
algorithm
(MIN)
evicts
the
page
that
will
be
used
farthest
in
the
future,
but
it
requires
future
knowledge
and
is
theoretical.
Aging
and
NRU
provide
practical
approximations.
table.
Disk
performance
dominates
the
cost
of
faults,
making
thrashing
a
risk
when
too
few
frames
are
available.
Some
systems
use
global
replacement
(across
all
processes)
while
others
use
local
replacement
(per
process)
to
limit
interference
and
improve
predictability.
remains
central
to
virtual
memory,
enabling
processes
to
use
memory
larger
than
physical
RAM
while
balancing
responsiveness
and
throughput.