

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
operation system Assignments to learn well and helpful
Typology: Assignments
Uploaded on 10/09/2022
5
(1)4 documents
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Second chance algorithm A simple modification to FIFO that avoids the problem of throwing out a heavily used page is to inspect the R bit of the oldest page. If it is 0, the page is both old and unused, so it is replaced immediately. If the R bit is 1, the bit is cleared, the page is put onto the end of the list of pages, and its load time is updated as though it had just arrived in memory. Then the search continues.
The operation of this algorithm, called second chance clock algorithm. Enhanced Second-Chance Algorithm. Improve algorithm by using reference bit and modify bit (if available) in concert Take ordered pair (reference, modify)
Counting based algorithm Keep a counter of the number of references that have been to made each page. LFU Algorithm: replaces page with smallest count Keep a counter of the number of references that have been made to each page Lease Frequently Used (LFU) Algorithm: replaces page with smallest count Most Frequently Used (MFU) Algorithm: based on the argument that the page with the smallest count was probably just brought in and has yet to be used Page Buffering Algorithm Keep a pool of free frames. When page faults, the desired page is read into a free frame from the pool before the victim is written to disk. Allow the process to restart as soon as possible. When convenient, evict victim Possibly, keep list of modified pages When backing store otherwise idle, write pages there and set to non-dirty Possibly, keep free frame contents intact and note what is in them If referenced again before reused, no need to load contents again from disk. Generally useful to reduce penalty if wrong victim frame selected.