0% found this document useful (0 votes)
29 views3 pages

Page Replacement Algorithm

The document discusses different page replacement algorithms: FIFO, LRU, and optimal page replacement. It provides examples of how each algorithm works on sample page reference strings and calculates the number of page faults for each.

Uploaded by

Lokesh Anandan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Page Replacement Algorithm

The document discusses different page replacement algorithms: FIFO, LRU, and optimal page replacement. It provides examples of how each algorithm works on sample page reference strings and calculates the number of page faults for each.

Uploaded by

Lokesh Anandan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Page replacement algorithm

FIFO

1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5

No of frames

=3

1* 4 4 4* 5 5 5*
2 2* 1 1 1* 3 3
3 3 3* 2 2 2* 4

No of page fault=9

No of frames=3

7* 2 2 2* 4 4 4* 0 0 0* 7 7 7

0 0* 3 3 3* 2 2 2* 1 1 1* 0 0

1 1 1* 0 0 0* 3 3 3* 2 2 2* 1

No of page =15

Belady’s Anomaly ==no of frames increases , no of pagefault


increases
LRU page replacement

= page that was not used for long time used for replacement

7 2 2 4 4 4 0 1 1 1
0 0 0 0 0 3 3 3 0 0
1 1 3 3 2 2 2 2 2 7

No of page fault=12

1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5

1 4 4 4 5 3 3 3
2 2 1 1 1 1 4 4
3 3 3 2 2 2 2 5

=10
Optimal page replacement= page that will not be used for long time

7 2 2 2 2 2 7
0 0 0 4 0 0 0
1 1 3 3 3 1 1

No of pagefault=9

1 1 6 6 6 2 4
2 2 2 2 1 1 1
3 5 5 3 3 3 3

=9

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy