14_page_replacement_algorithms_II

C pages 10 d 0 0 1 7 11 a 00a 00a 11 a 11 a 00a 11

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: finds
(0,1),
clear
dirty
bit
and
move
on,
 but
remember
page
is
dirty.

Write
only
if
 evicted.
 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
 Optimizing Approximate LRU Replacement The Second Chance Algorithm The Second Chance algorithm Example   There is a significant cost to replacing “dirty” pages   Modify the Clock algorithm to allow dirty pages to always survive one sweep of the clock hand 0 Time 1 2 3 4 c aw d bw a b c d a b c d Requests 5 e 6 b 7 aw 8 b 9 c 10 d Page 7: 1 1 0 0 Page 1: 1 0 0 5 Page 4: 1 0 0 3 Page 3: 1 1 1 9 Page 0: 1 1 1 4 resident bit used bit dirty bit Page Frames   Use both the dirty bit and the used bit to drive replacement Second Chance Algorithm Before clock sweep After clock sweep us...
View Full Document

Ask a homework question - tutors are online