SlideShare uma empresa 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

Mais conteúdo relacionado

Semelhante 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
 

Semelhante 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

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
 
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
 
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
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
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
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 

Último (20)

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
 
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
 
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
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
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
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
★ 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
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.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
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 

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