14_page_replacement_algorithms_II

Iftheosnds00isreplacesthatpage 2

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ed,
replace!
 •  (0,1):
note
recently
used
but
modified:
OS
needs
to
write,
but
may
 not
be
needed
anymore
 •  (1,0):
recently
used
and
unmodified:
may
be
needed
again
soon,
 but
doesn’t
need
to
be
wriWen
 •  (1,1):
recently
used
and
modified
 •  On
page
fault,
OS
searches
for
page
in
the
lowest
 nonempty
class
 1
 3/7/12
 Enhanced
Clock
Implementa@on
 Enhanced
Clock
Implementa@on
 (another
op@on)
 The
OS
goes
around
at
most
three
@mes
searching
 for
the
(0,0)
class:
 1.  If
the
OS
finds
(0,0)
is
replaces
that
page
 2.  If
the
OS
finds
(0,1)
it
ini@ates
an
I/O
to
write
 that
page,
locks
the
page
in
memory
un@l
the
I/ O
completes,
clears
the
modified
bit,
and
 con@nues
the
search
in
parallel
with
the
I/O
 3.  For
pages
with
the
reference
bit
set,
the
 reference
bit
is
cleared
 4.  On
second
pass
(no
page
(0,0)
found
on
first),
 pages
that
were
(0,1)
or
(1,0)
may
have
changed
 The
OS
goes
around
at
most
three
@mes
searching
 for
the
(0,0)
class:
 1.  If
the
OS
finds
(0,0)
is
replaces
that
page
 2.  If
the
OS...
View Full Document

Ask a homework question - tutors are online