SlideShare a Scribd company logo
A thesis in the Department of Computer Science and Engineering presented
in partial fulfillment of the requirements for the course syllabus of
Operating System
22th
August, 2019
Author:
Md. Al-Amin ID: 172015031
Nur Karim ID: 172015030
Ashraful Alam ID: 172015042
Supervisor:
Jesiya Sarmin
Chosse a best algorithm for page replacement to
reduce page fault and analysis their with C#
Green University of Bangladesh
Computer Science and Engineering
ABSTRACT:
This thesis is mainly focused on finding out the best page replacement algorithm to reduce page fault.
Page replacement algorithms choose pages to swap out from the memory when a new page needs for
allocation on the memory. Each algorithm has the objective to minimize the number of page faults.
With minimum page faults, the performance of the process is increased. In this paper, study and
analysis of three algorithms. They are-
 First in First out (FIFO)
 Least Recently Used (LRU)
 Optimal Page Replacement (OPT)
Keywords: FIFO, LRU, OPT, page fault, page replacement algorithm.
INTRODUCTION:
A page fault occurs when a program attempts to access a block of memory that is not stored in the
physical memory, or RAM. The fault notifies the operating system that it must locate the data in virtual
memory, then transfer it from the storage device, such as an HDD or SSD, to the system RAM.
Fig-01: How to occur a page fault
There are different policies regarding how to select a page to be swapped out when a page fault occurs
to create space for a new page. These policies are called page replacement algorithms. Several page
replacement algorithms exist like Optimal Page Replacement, First in First out, Least Recently Used,
Least Frequently Used, Most Frequently Used, Not Frequently Used, Second Chance Page
Replacement, Clock Page Replacement etc. In this paper, we implement three algorithms i.e. Optimal
Page Replacement, First in First out and Least Frequently Used using Visual Studio C#.
Working procedure on page replacement algorithm:
The Operating System has to choose a page to remove from memory for creating space for a new page
that has to be brought in. Page Replacement Algorithms are used for the selection of the page to replace.
In this paper, three page replacement algorithms are discussed.
First In First Out (FIFO) page replacement algorithm:
The First in First out (FIFO) page replacement algorithm is the simplest approach of replacing the page.
The idea is to replace the oldest page in main memory from all the pages i.e. that page is replaced which
has been in main memory for the greatest period of time. A FIFO queue can be created to hold all the
pages in main memory. The page that is at the front is replaced and when the page is fetched into
memory it is inserted at the Rear end. For this reason, FIFO algorithm is seldom used. Let us consider
a 20 pages common reference string- 1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16 for two, three, four
and five page frames in memory to find the page faults using FIFO page replacement algorithm. 5 page
frames output below-
Fig-02: Page fault output by use FIFO
In the above fig-01 with 5 page frames, the number of page faults is 15. The advantage of FIFO page
replacement algorithm is easy to implement and disadvantage is that it suffers from Belady’s anomaly.
Belady’s anomaly is an unexpected result in FIFO page replacement algorithm. In some of the reference
strings, increasing the size of the memory increases the page fault rate.
Least Recently Used (LRU) page replacement algorithm:
Least Recently Used (LRU) Page Replacement Algorithm replaces the page in memory that has not
been used for the longest period of time. The problem with this algorithm is the complexity in
implementation. The implementation may involve hardware or software support. The implementation
of this policy can be possible using matrix, counters, linked list etc. Consider the same reference string
1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16 with main memory that can accommodate 2, 3 4, and 5
page frames respectively to find the page faults using LRU page replacement algorithm.
Fig-03: Page fault output by use LRU
In the above fig-02 with 5 page frames, the number of page faults is also same15 as FIFO. The
advantage of LRU page replacement algorithm is that it does not suffer from Belady’s anomaly and
the disadvantage is that it needs expensive hardware support or additional data structure to implement.
Optimal (OPT) page replacement algorithm:
In Optimal page replacement algorithm, the page that will not be used for the longest period of time is
replaced to make space for the requested page. This algorithm is easy to explain theoretically but
difficult to implement because it requires to have accurate information of future events. Therefore its
use is limited to serving as a benchmark to which other page replacement algorithms may be compared.
This algorithm never suffers from belady’s anomaly. Consider again the same reference string
1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16 with main memory that can accommodate 2, 3, 4, and 5
page frames to find the page faults using OPT page replacement algorithm.
Fig-04: Page fault output by use OPT
In the above reference string with 4 page frames, the number of page faults is 05. The advantage of
optimal page replacement algorithm is that it has least rate of occurrences of page fault and the
disadvantage is that it is difficult to implement because it requires accurate knowledge of future events.
Experimental Result:
The purpose is to test the performance of the 3 algorithms with the same sequence. We have chosen a
reference string of 20 pages having the sequence: 1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16; firstly
we have tested it for two, three and four page frames. Above all the screenshot for 5 page frames is
shown in figure. In the application firstly it requires the number of empty frames, then it requires the
length of the reference string and at last the reference string itself. The number of page faults can be
calculated for all the three algorithms. A table with number of page faults, for each algorithm, with
page frame size 2, 3, 4 and 5 is generated as shown in table 1. With 2 page frames, FIFO generates 17
page faults, LRU generates also 17 page faults and Optimal generates 15 page faults. Similarly with 3
page frames, FIFO generates 16 page faults, LRU generates also 16 page faults and Optimal generates
13 page faults. With 4 page frames, FIFO generates 15 page faults, LRU generates 16 page faults and
Optimal generates 12 page faults. With 5 page frames, FIFO generates 15 page faults, LRU generates
15 page faults and Optimal generates 12 page faults.
Algorithm FIFO LRU OPT
Page Frames(2) 17 17 15
Page Frames(3) 16 16 13
Page Frames(4) 15 16 12
Page Frames(5) 15 15 12
Average 15.75 16 13
Table 1: Page faults for frame size 2, 3 4, and 5.
The graphical representation is shown in fig-5 in the below. From the figure, it is very much clear
that the optimal algorithm is the best among all the three page replacement algorithms. There
Fig-5: Graph showing page faults with 2, 3, 4 and 5 page frames and their average.
0
2
4
6
8
10
12
14
16
18
2 Frames 3 Frames 4 Frames 5 Frames Average
PageFault Ration
FIFO
LRU
OPT
Conclusion:
In the above study, we have found that optimal page replacement algorithm results the best
algorithm because the average page faults in all the three cases with page frame size 2, 3, 4 and 5
is less as compared to FIFO and LRU. A good page replacement algorithm reduces the number of
page faults. In FIFO algorithm, some reference strings produces unexpected results called Belady’s
anomaly i.e. by increasing the number of page frames, the page fault also increases. In that case
LRU works better than FIFO. In this paper, three different page replacement algorithms are studied
and implemented with C# and compare with respect to page faults.

More Related Content

What's hot (20)

PPTX
Operating system overview concepts ppt
RajendraPrasad Alladi
 
PPTX
Types of computer and its history
Muhammad kashif
 
PPTX
Introduction to Computers Lecture # 2
Sehrish Rafiq
 
PPTX
Types of computer
Burhan Ahmed
 
PDF
Introduction to information technology
EskenderAlAsbahi
 
PPTX
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Purnima Pandit
 
PPTX
Internet, intranet and extranet
Jehra Mae Sevillano Ü
 
PPT
Input devices
Oladapo Adefilola-Dapsy
 
PDF
Operating System-Introduction
Shipra Swati
 
PPTX
Generations of computer
Jatin Jindal
 
PPTX
Applications of computers
lalith saie
 
PPTX
What is artificial intelligence? What are task domains in AI?
Cyber Infrastructure INC
 
PPTX
different types of computers
priya biju
 
PPT
COMPUTER SYSTEM
Yanne Evangelista
 
PPTX
History of computer
BeeducatorComputer
 
PDF
Introduction to Operating Systems
Mukesh Chinta
 
PPTX
Advantages and disadvantages of computer system
parag dhok
 
PPTX
Characteristics of Computer
comaestro Inc.
 
PPT
Generations of computer
Dr. B T Sampath Kumar
 
Operating system overview concepts ppt
RajendraPrasad Alladi
 
Types of computer and its history
Muhammad kashif
 
Introduction to Computers Lecture # 2
Sehrish Rafiq
 
Types of computer
Burhan Ahmed
 
Introduction to information technology
EskenderAlAsbahi
 
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Purnima Pandit
 
Internet, intranet and extranet
Jehra Mae Sevillano Ü
 
Operating System-Introduction
Shipra Swati
 
Generations of computer
Jatin Jindal
 
Applications of computers
lalith saie
 
What is artificial intelligence? What are task domains in AI?
Cyber Infrastructure INC
 
different types of computers
priya biju
 
COMPUTER SYSTEM
Yanne Evangelista
 
History of computer
BeeducatorComputer
 
Introduction to Operating Systems
Mukesh Chinta
 
Advantages and disadvantages of computer system
parag dhok
 
Characteristics of Computer
comaestro Inc.
 
Generations of computer
Dr. B T Sampath Kumar
 

Similar to Chosse a best algorithm for page replacement to reduce page fault and analysis their with c# (20)

PPTX
page replacement.pptx
homipeh
 
PDF
Pge Replacement Algorithm.pdf
82NehaPal
 
PPTX
Page replacement algorithm
Nikhil Katte
 
PPT
Pagereplacement algorithm(computional concept)
Siddhi Viradiya
 
PPTX
Page replacement algorithms
sangrampatil81
 
PPT
Page Replacement
chandinisanz
 
PPTX
Page replacement alg
V.V.Vanniapermal College for Women
 
PPT
42 lru optimal
myrajendra
 
PPTX
Operating system 39 first in first out algorithm
Vaibhav Khanna
 
PPTX
Page replacement_Architecture ppt (213015018+213015017).pptx
MD SAZID ZAMIL
 
PPT
Page replacement
sashi799
 
PPT
9415070 deepak kumar raja kumar hgdxgfgcg
deepakraja1120
 
PPT
Operating System
Subhasis Dash
 
PPTX
Page replacement algorithm
Lavina Gehlot
 
PPTX
Page replacement
Davin Abraham
 
PDF
Hybrid Page Replacement Algorithm
IJSRED
 
PDF
An input enhancement technique to maximize the performance of page replacemen...
eSAT Journals
 
PPTX
Page Replacement Methods-R.D.Sivakumar
Sivakumar R D .
 
PPTX
Understanding-FIFO-Page-Replacement.pptx
shreyacmore23
 
PPT
41 page replacement fifo
myrajendra
 
page replacement.pptx
homipeh
 
Pge Replacement Algorithm.pdf
82NehaPal
 
Page replacement algorithm
Nikhil Katte
 
Pagereplacement algorithm(computional concept)
Siddhi Viradiya
 
Page replacement algorithms
sangrampatil81
 
Page Replacement
chandinisanz
 
42 lru optimal
myrajendra
 
Operating system 39 first in first out algorithm
Vaibhav Khanna
 
Page replacement_Architecture ppt (213015018+213015017).pptx
MD SAZID ZAMIL
 
Page replacement
sashi799
 
9415070 deepak kumar raja kumar hgdxgfgcg
deepakraja1120
 
Operating System
Subhasis Dash
 
Page replacement algorithm
Lavina Gehlot
 
Page replacement
Davin Abraham
 
Hybrid Page Replacement Algorithm
IJSRED
 
An input enhancement technique to maximize the performance of page replacemen...
eSAT Journals
 
Page Replacement Methods-R.D.Sivakumar
Sivakumar R D .
 
Understanding-FIFO-Page-Replacement.pptx
shreyacmore23
 
41 page replacement fifo
myrajendra
 
Ad

More from MdAlAmin187 (20)

PPTX
Decision tree in artificial intelligence
MdAlAmin187
 
PPTX
2D viewing & clipping
MdAlAmin187
 
DOCX
Assignment on field study of Mahera & Pakutia Jomidar Bari
MdAlAmin187
 
PPTX
Social problems in Bangladesh
MdAlAmin187
 
PPTX
History of Language & History of Bangla Language
MdAlAmin187
 
PPTX
Lu Decomposition
MdAlAmin187
 
PPTX
Non Linear Equation
MdAlAmin187
 
PDF
Smart home technology LaTeX paper
MdAlAmin187
 
DOCX
Emo 8086 code for Loop
MdAlAmin187
 
DOCX
Emo 8086 code for add
MdAlAmin187
 
DOCX
Emo 8086 code for Subtraction
MdAlAmin187
 
DOCX
Virtual local area network(VLAN)
MdAlAmin187
 
DOCX
Telnet configuration
MdAlAmin187
 
DOCX
Standard & Extended ACL Configuration
MdAlAmin187
 
PPTX
Topological Sort
MdAlAmin187
 
PPTX
Verification of Solenoidal & Irrotational
MdAlAmin187
 
PPTX
Bangla spell checker & suggestion generator
MdAlAmin187
 
PPTX
Different types of DBMS
MdAlAmin187
 
PPTX
Discrete mathematics
MdAlAmin187
 
PPTX
Math presentation
MdAlAmin187
 
Decision tree in artificial intelligence
MdAlAmin187
 
2D viewing & clipping
MdAlAmin187
 
Assignment on field study of Mahera & Pakutia Jomidar Bari
MdAlAmin187
 
Social problems in Bangladesh
MdAlAmin187
 
History of Language & History of Bangla Language
MdAlAmin187
 
Lu Decomposition
MdAlAmin187
 
Non Linear Equation
MdAlAmin187
 
Smart home technology LaTeX paper
MdAlAmin187
 
Emo 8086 code for Loop
MdAlAmin187
 
Emo 8086 code for add
MdAlAmin187
 
Emo 8086 code for Subtraction
MdAlAmin187
 
Virtual local area network(VLAN)
MdAlAmin187
 
Telnet configuration
MdAlAmin187
 
Standard & Extended ACL Configuration
MdAlAmin187
 
Topological Sort
MdAlAmin187
 
Verification of Solenoidal & Irrotational
MdAlAmin187
 
Bangla spell checker & suggestion generator
MdAlAmin187
 
Different types of DBMS
MdAlAmin187
 
Discrete mathematics
MdAlAmin187
 
Math presentation
MdAlAmin187
 
Ad

Recently uploaded (20)

PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Horarios de distribución de agua en julio
pegazohn1978
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 

Chosse a best algorithm for page replacement to reduce page fault and analysis their with c#

  • 1. A thesis in the Department of Computer Science and Engineering presented in partial fulfillment of the requirements for the course syllabus of Operating System 22th August, 2019 Author: Md. Al-Amin ID: 172015031 Nur Karim ID: 172015030 Ashraful Alam ID: 172015042 Supervisor: Jesiya Sarmin Chosse a best algorithm for page replacement to reduce page fault and analysis their with C# Green University of Bangladesh Computer Science and Engineering
  • 2. ABSTRACT: This thesis is mainly focused on finding out the best page replacement algorithm to reduce page fault. Page replacement algorithms choose pages to swap out from the memory when a new page needs for allocation on the memory. Each algorithm has the objective to minimize the number of page faults. With minimum page faults, the performance of the process is increased. In this paper, study and analysis of three algorithms. They are-  First in First out (FIFO)  Least Recently Used (LRU)  Optimal Page Replacement (OPT) Keywords: FIFO, LRU, OPT, page fault, page replacement algorithm. INTRODUCTION: A page fault occurs when a program attempts to access a block of memory that is not stored in the physical memory, or RAM. The fault notifies the operating system that it must locate the data in virtual memory, then transfer it from the storage device, such as an HDD or SSD, to the system RAM. Fig-01: How to occur a page fault There are different policies regarding how to select a page to be swapped out when a page fault occurs to create space for a new page. These policies are called page replacement algorithms. Several page replacement algorithms exist like Optimal Page Replacement, First in First out, Least Recently Used,
  • 3. Least Frequently Used, Most Frequently Used, Not Frequently Used, Second Chance Page Replacement, Clock Page Replacement etc. In this paper, we implement three algorithms i.e. Optimal Page Replacement, First in First out and Least Frequently Used using Visual Studio C#. Working procedure on page replacement algorithm: The Operating System has to choose a page to remove from memory for creating space for a new page that has to be brought in. Page Replacement Algorithms are used for the selection of the page to replace. In this paper, three page replacement algorithms are discussed. First In First Out (FIFO) page replacement algorithm: The First in First out (FIFO) page replacement algorithm is the simplest approach of replacing the page. The idea is to replace the oldest page in main memory from all the pages i.e. that page is replaced which has been in main memory for the greatest period of time. A FIFO queue can be created to hold all the pages in main memory. The page that is at the front is replaced and when the page is fetched into memory it is inserted at the Rear end. For this reason, FIFO algorithm is seldom used. Let us consider a 20 pages common reference string- 1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16 for two, three, four and five page frames in memory to find the page faults using FIFO page replacement algorithm. 5 page frames output below- Fig-02: Page fault output by use FIFO
  • 4. In the above fig-01 with 5 page frames, the number of page faults is 15. The advantage of FIFO page replacement algorithm is easy to implement and disadvantage is that it suffers from Belady’s anomaly. Belady’s anomaly is an unexpected result in FIFO page replacement algorithm. In some of the reference strings, increasing the size of the memory increases the page fault rate. Least Recently Used (LRU) page replacement algorithm: Least Recently Used (LRU) Page Replacement Algorithm replaces the page in memory that has not been used for the longest period of time. The problem with this algorithm is the complexity in implementation. The implementation may involve hardware or software support. The implementation of this policy can be possible using matrix, counters, linked list etc. Consider the same reference string 1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16 with main memory that can accommodate 2, 3 4, and 5 page frames respectively to find the page faults using LRU page replacement algorithm. Fig-03: Page fault output by use LRU In the above fig-02 with 5 page frames, the number of page faults is also same15 as FIFO. The advantage of LRU page replacement algorithm is that it does not suffer from Belady’s anomaly and the disadvantage is that it needs expensive hardware support or additional data structure to implement.
  • 5. Optimal (OPT) page replacement algorithm: In Optimal page replacement algorithm, the page that will not be used for the longest period of time is replaced to make space for the requested page. This algorithm is easy to explain theoretically but difficult to implement because it requires to have accurate information of future events. Therefore its use is limited to serving as a benchmark to which other page replacement algorithms may be compared. This algorithm never suffers from belady’s anomaly. Consider again the same reference string 1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16 with main memory that can accommodate 2, 3, 4, and 5 page frames to find the page faults using OPT page replacement algorithm. Fig-04: Page fault output by use OPT In the above reference string with 4 page frames, the number of page faults is 05. The advantage of optimal page replacement algorithm is that it has least rate of occurrences of page fault and the disadvantage is that it is difficult to implement because it requires accurate knowledge of future events.
  • 6. Experimental Result: The purpose is to test the performance of the 3 algorithms with the same sequence. We have chosen a reference string of 20 pages having the sequence: 1,7,14,0,9,4,18,18,2,4,5,5,1,7,1,11,15,2,7,16; firstly we have tested it for two, three and four page frames. Above all the screenshot for 5 page frames is shown in figure. In the application firstly it requires the number of empty frames, then it requires the length of the reference string and at last the reference string itself. The number of page faults can be calculated for all the three algorithms. A table with number of page faults, for each algorithm, with page frame size 2, 3, 4 and 5 is generated as shown in table 1. With 2 page frames, FIFO generates 17 page faults, LRU generates also 17 page faults and Optimal generates 15 page faults. Similarly with 3 page frames, FIFO generates 16 page faults, LRU generates also 16 page faults and Optimal generates 13 page faults. With 4 page frames, FIFO generates 15 page faults, LRU generates 16 page faults and Optimal generates 12 page faults. With 5 page frames, FIFO generates 15 page faults, LRU generates 15 page faults and Optimal generates 12 page faults. Algorithm FIFO LRU OPT Page Frames(2) 17 17 15 Page Frames(3) 16 16 13 Page Frames(4) 15 16 12 Page Frames(5) 15 15 12 Average 15.75 16 13 Table 1: Page faults for frame size 2, 3 4, and 5. The graphical representation is shown in fig-5 in the below. From the figure, it is very much clear that the optimal algorithm is the best among all the three page replacement algorithms. There Fig-5: Graph showing page faults with 2, 3, 4 and 5 page frames and their average. 0 2 4 6 8 10 12 14 16 18 2 Frames 3 Frames 4 Frames 5 Frames Average PageFault Ration FIFO LRU OPT
  • 7. Conclusion: In the above study, we have found that optimal page replacement algorithm results the best algorithm because the average page faults in all the three cases with page frame size 2, 3, 4 and 5 is less as compared to FIFO and LRU. A good page replacement algorithm reduces the number of page faults. In FIFO algorithm, some reference strings produces unexpected results called Belady’s anomaly i.e. by increasing the number of page frames, the page fault also increases. In that case LRU works better than FIFO. In this paper, three different page replacement algorithms are studied and implemented with C# and compare with respect to page faults.