































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of page replacement algorithms, focusing on fifo (first in, first out), lru (least recently used), and the optimal algorithm. It explains the concept of page replacement, the need for algorithms, and the limitations of the optimal algorithm. The document also covers various page replacement algorithms, their implementation, and their advantages and disadvantages.
Typology: Study notes
1 / 71
This page cannot be seen from the preview
Don't miss anything!
































































Jonathan Walpole Computer Science Portland State University
Requests
c^ a^
d^ b^
e^ b^
a^ b^
c^ d
Page^
0 a Frames 1
b 2 c 3 d Page faults
a^ a^
a^ a b^ b^
b^ b c^ c^
c^ c d^ d^
d^ d
Requests
c^ a^
d^ b^
e^ b^
a^ b^
c^ a
Page^
0 a Frames 1
b 2 c 3 d Page faults
a^ a^
a b c^ c^
c^ c d^ d
Requests
c^ a^
d^ b^
e^ b^
a^ b^
c^ a
Page^
0 a Frames 1
b 2 c 3 d Page faults
a^ a^
a^ a^
a b^ b^
b
c^ c^
c^ c^
e^ e d^ d^
d^ d X
“Replace the page that has been in memory for thelongest time.” Implementation Maintain a linked list of all pages in memory Keep it in order of when they came into memory The page at the front of the list is oldest Add new page to end of list
If the bit is set, clear it and move on to the next page Replaces pages that haven’t been referenced for one completeclock revolution
1
(^12) 3 5 4
0
clock bit^ frame #