SlideShare a Scribd company logo
1 of 7
Topic:-
Presented By-
Lavina Gehlot
B.C.A 2nd YEAR
Page Replacement :
 Want lowest page-fault rate
 Evaluate algorithm by running it on a particular string
of memory references & computing the number of page
faults & page replacement on that string.
Page Replacement Algorithm
 FIFO Page Replacement Algorithm
 LRU Page Replacement Algorithm
 Optimal Page Replacement Algorithm
First In First
Out Algorithm
Replace that block
in the set that has
been in the cache
for longest period
of time
 FIFO Example
 Reference String is :
1,2,5,3,2,4,5,1,2,6
Frame Size=3
1 1 1 3 3 3 3 3 2 2
2 2 2 2 4 4 4 4 6
5 5 5 5 5 1 1 1
Page Fault : 8
Least Recently
Used Algorithm
Replace that block
in the set that has
been in the cache
for longest period
of time with no
reference to it
 LRU Example
 Reference String is :
5,1,2,3,2,4,5,1,7,6
Frame Size=3
5 5 5 5 5 5 5 5 5 5
1 1 3 3 3 3 1 7 7
2 2 2 4 4 4 4 6
Page Fault: 8
Optimal
Algorithm
(i) Lowest Page
Fault
(ii)Replace the
page that will
not be used for
the longest
period of time
 Optimal Example
 Reference String is:
7,0,1,2,0,3,1,4,2,3
Frame Size=3
7 7 7 2 2 2 2 2 2 2
0 0 0 0 3 3 3 3 3
1 1 1 1 1 4 4 4
Page Fault :6
Page replacement algorithm

More Related Content

What's hot

What's hot (20)

virtual memory
virtual memoryvirtual memory
virtual memory
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
 
9 virtual memory management
9 virtual memory management9 virtual memory management
9 virtual memory management
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Pipelining
PipeliningPipelining
Pipelining
 
Loop optimization
Loop optimizationLoop optimization
Loop optimization
 
Conditional branches
Conditional branchesConditional branches
Conditional branches
 
Cache optimization
Cache optimizationCache optimization
Cache optimization
 
cache memory
 cache memory cache memory
cache memory
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Chapter 5 a
Chapter 5 aChapter 5 a
Chapter 5 a
 
Memory management
Memory managementMemory management
Memory management
 
Pipelining In computer
Pipelining In computer Pipelining In computer
Pipelining In computer
 
Unit - 5 Pipelining.pptx
Unit - 5 Pipelining.pptxUnit - 5 Pipelining.pptx
Unit - 5 Pipelining.pptx
 
Evaluation of computer performance
Evaluation of computer performanceEvaluation of computer performance
Evaluation of computer performance
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 
Trace Scheduling
Trace SchedulingTrace Scheduling
Trace Scheduling
 

Viewers also liked

Page replacement
Page replacementPage replacement
Page replacementsashi799
 
bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)Siddhi Viradiya
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentationelliehood
 

Viewers also liked (8)

Ofdm(tutorial)
Ofdm(tutorial)Ofdm(tutorial)
Ofdm(tutorial)
 
Process State & Life Cycle
Process  State & Life CycleProcess  State & Life Cycle
Process State & Life Cycle
 
Page replacement
Page replacementPage replacement
Page replacement
 
Page Replacement
Page ReplacementPage Replacement
Page Replacement
 
bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)
 
Apurva
ApurvaApurva
Apurva
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentation
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Similar to Page replacement algorithm

Pagereplacement algorithm(computional concept)
Pagereplacement algorithm(computional concept)Pagereplacement algorithm(computional concept)
Pagereplacement algorithm(computional concept)Siddhi Viradiya
 
FIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement AlgorithmFIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement AlgorithmArijitRoy118
 
p4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docx
p4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docxp4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docx
p4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docxsmile790243
 
Ch10 OS
Ch10 OSCh10 OS
Ch10 OSC.U
 
Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...MdAlAmin187
 
Virtual memory and page replacement algorithm
Virtual memory and page replacement algorithmVirtual memory and page replacement algorithm
Virtual memory and page replacement algorithmMuhammad Mansoor Ul Haq
 
Operating system 38 page replacement
Operating system 38 page replacementOperating system 38 page replacement
Operating system 38 page replacementVaibhav Khanna
 
42 lru optimal
42 lru optimal42 lru optimal
42 lru optimalmyrajendra
 
An input enhancement technique to maximize the performance of page replacemen...
An input enhancement technique to maximize the performance of page replacemen...An input enhancement technique to maximize the performance of page replacemen...
An input enhancement technique to maximize the performance of page replacemen...eSAT Journals
 
A Low Power Hybrid Partition SRAM based TCAM with a Parity Bit
A Low Power Hybrid Partition SRAM based TCAM with a Parity BitA Low Power Hybrid Partition SRAM based TCAM with a Parity Bit
A Low Power Hybrid Partition SRAM based TCAM with a Parity BitAM Publications
 

Similar to Page replacement algorithm (20)

Page replacement alg
Page replacement algPage replacement alg
Page replacement alg
 
Pagereplacement algorithm(computional concept)
Pagereplacement algorithm(computional concept)Pagereplacement algorithm(computional concept)
Pagereplacement algorithm(computional concept)
 
FIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement AlgorithmFIFO, LRU, OPTIMAL Page Replacement Algorithm
FIFO, LRU, OPTIMAL Page Replacement Algorithm
 
p4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docx
p4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docxp4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docx
p4-start.cppp4-start.cpp @file  p4-start.c    @author Y.docx
 
Virtual memory
Virtual memory Virtual memory
Virtual memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Mem mgt
Mem mgtMem mgt
Mem mgt
 
page_fault pbm.ppt
page_fault pbm.pptpage_fault pbm.ppt
page_fault pbm.ppt
 
OSCh10
OSCh10OSCh10
OSCh10
 
Ch10 OS
Ch10 OSCh10 OS
Ch10 OS
 
OS_Ch10
OS_Ch10OS_Ch10
OS_Ch10
 
Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...
 
Ch09
Ch09Ch09
Ch09
 
Virtual memory and page replacement algorithm
Virtual memory and page replacement algorithmVirtual memory and page replacement algorithm
Virtual memory and page replacement algorithm
 
Operating system 38 page replacement
Operating system 38 page replacementOperating system 38 page replacement
Operating system 38 page replacement
 
Lecture 43
Lecture 43Lecture 43
Lecture 43
 
42 lru optimal
42 lru optimal42 lru optimal
42 lru optimal
 
An input enhancement technique to maximize the performance of page replacemen...
An input enhancement technique to maximize the performance of page replacemen...An input enhancement technique to maximize the performance of page replacemen...
An input enhancement technique to maximize the performance of page replacemen...
 
Cache memory
Cache memoryCache memory
Cache memory
 
A Low Power Hybrid Partition SRAM based TCAM with a Parity Bit
A Low Power Hybrid Partition SRAM based TCAM with a Parity BitA Low Power Hybrid Partition SRAM based TCAM with a Parity Bit
A Low Power Hybrid Partition SRAM based TCAM with a Parity Bit
 

Recently uploaded

What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Recently uploaded (20)

What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

Page replacement algorithm

  • 2. Page Replacement :  Want lowest page-fault rate  Evaluate algorithm by running it on a particular string of memory references & computing the number of page faults & page replacement on that string.
  • 3. Page Replacement Algorithm  FIFO Page Replacement Algorithm  LRU Page Replacement Algorithm  Optimal Page Replacement Algorithm
  • 4. First In First Out Algorithm Replace that block in the set that has been in the cache for longest period of time  FIFO Example  Reference String is : 1,2,5,3,2,4,5,1,2,6 Frame Size=3 1 1 1 3 3 3 3 3 2 2 2 2 2 2 4 4 4 4 6 5 5 5 5 5 1 1 1 Page Fault : 8
  • 5. Least Recently Used Algorithm Replace that block in the set that has been in the cache for longest period of time with no reference to it  LRU Example  Reference String is : 5,1,2,3,2,4,5,1,7,6 Frame Size=3 5 5 5 5 5 5 5 5 5 5 1 1 3 3 3 3 1 7 7 2 2 2 4 4 4 4 6 Page Fault: 8
  • 6. Optimal Algorithm (i) Lowest Page Fault (ii)Replace the page that will not be used for the longest period of time  Optimal Example  Reference String is: 7,0,1,2,0,3,1,4,2,3 Frame Size=3 7 7 7 2 2 2 2 2 2 2 0 0 0 0 3 3 3 3 3 1 1 1 1 1 4 4 4 Page Fault :6