SlideShare una empresa de Scribd logo
1 de 22
TOPIC:
COMPARISION OF PAGE REPLACEMET
ALGORITHMS
• In computer operating systems, paging is one of the
memory-management schemes by which a computer can
store and retrieve data from secondary storage for use in
main memory.
• In the paging memory-management scheme, the
operating system retrieves data from secondary storage
in same-size blocks called pages.
What is Paging ?
PAGE FRAMES
• The main memory is divided into fixed
sized portions called page frame.
• The size of page frame is same as the size
of page because pages have to reside in
page frames.
PAGE FAULTS
• A page fault is an error occurred when a
process/user tries to access a page and it is
not present in the physical memory.
During a page fault, the operating system
must:
• Obtain an empty page frame in RAM to use as a
container for the data.
• If, all page frames are in use, the operating system must
select a victim page and replace it with the new page and
to select the victim page we need page replacement
algorithms
3
2
1
4
2
Page 1
Page 3
Page 2
Physical memory
(fixed frames )
PAGES USER WANTS TO ACESS
PAGE 1
PAGE 2
PAGE 3
PAGE 4
Secondary memory
•First In First Out.
•Least Recently Used
•Optimal Replacement.
•The Clock Algorithm.
• LRU-K
• Low Inter-reference Recency Set (LIRS)
ALGORITHMS
First in first out
• First in first out is very easy to implement
• The fifo algorithm select the page for
replacement that has been in memory the longest
time
FIFO Example
Oldest
Newest
• FIFO is easy to understand.
• It is very easy to implement.
ADVANTAGES
DISADVANTAGES
• Might skip out on important pages
LEAST RECENTLY USED (LRU)
• The least recently used page replacement
algorithm keeps track page uses over a short
period of time.
• The least recently used page replacement policy
selects the victim page based on the page which
has not been referenced for the longest time.
LRU EXAMPLE
Recently
referenced
• LRU page replacement algorithm is quiet efficient.
DISADVANTAGS
• Implementation difficult. This algorithm requires keeping
track of what was used when, which is expensive if one
wants to make sure the algorithm always discards the least
recently used item.
ADVANTAGES
• The optimal policy selects that page for
replacement that will not be needed for the
longest time
• The OS keeps track of all pages referenced by
the Program
• This algorithm result is fewest number of
page faults.
OPTIMAL PAGE REPLACEMENT
ALGORITHM
OPTIMAL EXAMPLE
Referenced last
•Advantages
▫ Optimal.
•Disadvantages
▫ Impossible to implement (need to know the
future) but serves as a standard to compare
with the other algorithms.
CLOCK ALGORITHM
• Variant of FIFO & LRU
• Keep frames in circle
• On page fault, OS:
• Checks reference bit of next frame
• If reference bit = 0, replace page, set bit to 1
• If reference bit = 1, set bit to 0, advance pointer to
next frame
COMPARISON OF CLOCK,FIFO AND LRU
LRU-K
• The LRU policy takes into account the recency information
while evicting pages, without considering the frequency.
• LRU-K was proposed which evicts pages with the largest
backward K-distance.
• Backward K-distance of a page p is the distance backward
from the current time to the Kth most recent reference to
the page p
LIRS (Low Inter-reference Recency Set)
• The Low Inter-reference Recency Set algorithm takes into
consideration the Inter-Reference Recency of pages as the
dominant factor for eviction
• The Low Inter-reference Recency Set algorithm takes into
consideration the Inter-Reference Recency of pages as the
dominant factor for eviction
• It is assumed that if current IRR of a page is large, then the next
IRR of the block is likely to be large again and hence the page
is suitable for eviction as per Belady's MIN

Más contenido relacionado

Similar a Comparision of page replacement algorithms.pptx

Memory management
Memory managementMemory management
Memory managementRasi123
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memoryghayour abbas
 
Replacement.ppt operating system in BCA cu
Replacement.ppt operating system in BCA cuReplacement.ppt operating system in BCA cu
Replacement.ppt operating system in BCA cuPankajKumar790026
 
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxLecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxAmanuelmergia
 
Virtual Memory in Operating System
Virtual Memory in Operating SystemVirtual Memory in Operating System
Virtual Memory in Operating SystemMeghaj Mallick
 
Virtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdfVirtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdfHarika Pudugosula
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptxShayanAli68
 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory managementGokul Vasan
 
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdfVirtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdfHarika Pudugosula
 
Internet of Things, TYBSC IT, Semester 5, Unit IV
Internet of Things, TYBSC IT, Semester 5, Unit IVInternet of Things, TYBSC IT, Semester 5, Unit IV
Internet of Things, TYBSC IT, Semester 5, Unit IVArti Parab Academics
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43myrajendra
 
Operating system 38 page replacement
Operating system 38 page replacementOperating system 38 page replacement
Operating system 38 page replacementVaibhav Khanna
 
page replacement.pptx
page replacement.pptxpage replacement.pptx
page replacement.pptxhomipeh
 

Similar a Comparision of page replacement algorithms.pptx (20)

virtual memory
virtual memoryvirtual memory
virtual memory
 
Memory management
Memory managementMemory management
Memory management
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
 
Replacement.ppt operating system in BCA cu
Replacement.ppt operating system in BCA cuReplacement.ppt operating system in BCA cu
Replacement.ppt operating system in BCA cu
 
Chapter08
Chapter08Chapter08
Chapter08
 
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptxLecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptx
 
Virtual Memory in Operating System
Virtual Memory in Operating SystemVirtual Memory in Operating System
Virtual Memory in Operating System
 
Virtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdfVirtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdf
 
OS UNIT4.pptx
OS UNIT4.pptxOS UNIT4.pptx
OS UNIT4.pptx
 
Page replacement alg
Page replacement algPage replacement alg
Page replacement alg
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptx
 
Understanding memory management
Understanding memory managementUnderstanding memory management
Understanding memory management
 
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdfVirtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
 
Internet of Things, TYBSC IT, Semester 5, Unit IV
Internet of Things, TYBSC IT, Semester 5, Unit IVInternet of Things, TYBSC IT, Semester 5, Unit IV
Internet of Things, TYBSC IT, Semester 5, Unit IV
 
Page replacement
Page replacementPage replacement
Page replacement
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
 
O ssvv82014
O ssvv82014O ssvv82014
O ssvv82014
 
Operating system 38 page replacement
Operating system 38 page replacementOperating system 38 page replacement
Operating system 38 page replacement
 
page replacement.pptx
page replacement.pptxpage replacement.pptx
page replacement.pptx
 
virtual_memory (3).pptx
virtual_memory (3).pptxvirtual_memory (3).pptx
virtual_memory (3).pptx
 

Último

PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 

Último (20)

PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 

Comparision of page replacement algorithms.pptx

  • 1. TOPIC: COMPARISION OF PAGE REPLACEMET ALGORITHMS
  • 2. • In computer operating systems, paging is one of the memory-management schemes by which a computer can store and retrieve data from secondary storage for use in main memory. • In the paging memory-management scheme, the operating system retrieves data from secondary storage in same-size blocks called pages. What is Paging ?
  • 3. PAGE FRAMES • The main memory is divided into fixed sized portions called page frame. • The size of page frame is same as the size of page because pages have to reside in page frames.
  • 4.
  • 5. PAGE FAULTS • A page fault is an error occurred when a process/user tries to access a page and it is not present in the physical memory. During a page fault, the operating system must: • Obtain an empty page frame in RAM to use as a container for the data. • If, all page frames are in use, the operating system must select a victim page and replace it with the new page and to select the victim page we need page replacement algorithms
  • 6. 3 2 1 4 2 Page 1 Page 3 Page 2 Physical memory (fixed frames ) PAGES USER WANTS TO ACESS PAGE 1 PAGE 2 PAGE 3 PAGE 4 Secondary memory
  • 7. •First In First Out. •Least Recently Used •Optimal Replacement. •The Clock Algorithm. • LRU-K • Low Inter-reference Recency Set (LIRS) ALGORITHMS
  • 8. First in first out • First in first out is very easy to implement • The fifo algorithm select the page for replacement that has been in memory the longest time
  • 10. • FIFO is easy to understand. • It is very easy to implement. ADVANTAGES DISADVANTAGES • Might skip out on important pages
  • 11. LEAST RECENTLY USED (LRU) • The least recently used page replacement algorithm keeps track page uses over a short period of time. • The least recently used page replacement policy selects the victim page based on the page which has not been referenced for the longest time.
  • 13. • LRU page replacement algorithm is quiet efficient. DISADVANTAGS • Implementation difficult. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. ADVANTAGES
  • 14. • The optimal policy selects that page for replacement that will not be needed for the longest time • The OS keeps track of all pages referenced by the Program • This algorithm result is fewest number of page faults. OPTIMAL PAGE REPLACEMENT ALGORITHM
  • 16. •Advantages ▫ Optimal. •Disadvantages ▫ Impossible to implement (need to know the future) but serves as a standard to compare with the other algorithms.
  • 17. CLOCK ALGORITHM • Variant of FIFO & LRU • Keep frames in circle • On page fault, OS: • Checks reference bit of next frame • If reference bit = 0, replace page, set bit to 1 • If reference bit = 1, set bit to 0, advance pointer to next frame
  • 18.
  • 20.
  • 21. LRU-K • The LRU policy takes into account the recency information while evicting pages, without considering the frequency. • LRU-K was proposed which evicts pages with the largest backward K-distance. • Backward K-distance of a page p is the distance backward from the current time to the Kth most recent reference to the page p
  • 22. LIRS (Low Inter-reference Recency Set) • The Low Inter-reference Recency Set algorithm takes into consideration the Inter-Reference Recency of pages as the dominant factor for eviction • The Low Inter-reference Recency Set algorithm takes into consideration the Inter-Reference Recency of pages as the dominant factor for eviction • It is assumed that if current IRR of a page is large, then the next IRR of the block is likely to be large again and hence the page is suitable for eviction as per Belady's MIN