SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
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
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 

Dernier (20)

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
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, ...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 

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