




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, specifically fifo (first in, first out) and lru (least recently used), in the context of operating systems. The advantages and disadvantages of each algorithm, as well as the concept of thrashing and swapping. Real-life examples are given to illustrate the concepts.
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





z
z
Replace the page that was brought in longest ago
However
-^
old pages may be great pages (frequently used)
-^
number of page faults may increase when one increases number ofpage frames (discouraging!)
z
Replace the page that will be used furthest in the future
Good algorithm(!) but requires knowledge of the future
With good compiler assistance, knowledge of the future issometimes possible
access 1 - (1) fault
-^
access 2 - (1,2) fault
-^
access 3- (1,2,3) fault
-^
access 4 - (2,3,4) fault, replacement
-^
access 1 - (3,4,1) fault, replacement
-^
access 2 - (4,1,2) fault, replacement
-^
access 5 - (1,2,5) fault, replacement
-^
access 1- (1,2,5)
-^
access 2 - (1,2,5)
-^
access 3 - (2,5,3) fault, replacement
-^
access 4 - (5,3,4) fault, replacement
-^
access 5 - (5,3,4)
access 1 - (1) fault
-^
access 2 - (1,2) fault
-^
access 3- (1,2,3) fault
-^
access 4 - (2,3,4) fault, replacement
-^
access 1 - (3,4,1) fault, replacement
-^
access 2 - (4,1,2) fault, replacement
-^
access 5 - (1,2,5) fault, replacement
-^
access 1- (2,5,1)
-^
access 2 - (5,1,2)
-^
access 3 - (1,2,3) fault, replacement
-^
access 4 - (2,3,4) fault, replacement
-^
access 5 - (3,4,5) fault, replacement
access 1 - (1)
fault
access 2 - (1,2) fault
-^
access 3- (1,2,3) fault
-^
access 4 - (1,2,3,4) fault, replacement
-^
access 1 - (1,2,3,4)
-^
access 2 - (1,2,3,4)
-^
access 5 - (2,3,4,5) fault, replacement
-^
access 1- (3,4,5,1) fault, replacement
-^
access 2 - (4,5,1,2) fault, replacement
-^
access 3 - (5,1,2,3) fault, replacement
-^
access 4 - (1,2,3,4) fault, replacement
-^
access 5 - (2,3,4,5) fault, replacement
z
z
z