Click to edit Master title style
Page Replacement Algorithm
Presented By Zoha Javed
2 0 2 5 11 0 11 9
BSCS-V
1 1
Click to edit Master
Page Replacement title style
Algorithm • FIFO algorithm.
• Optimal
algorithm.
• LRU algorithm.
Paging
A memory management technique Virtual Memory
in which process address space is
broken into blocks of the same Illusion provided considering no
size called pages. limitation to processes and finite
size of main memory
2
Click Replacement
Page to edit MasterAlgorithm
title style
Explanation for Paging
Lastly the required process is sent to CPU
Logical Address Main Memory
Left: Page number to go to; Right: Offset/page size 0 1
Bits of given logical
0 1
1 1 address is 11 0 0 1
CPU 0 0 1
1 2 3
Left segment tell 1 2 3
the required
3 Secondary Memory
process is in page 2 4 5
CPU 1. (containing processes)
gives Physical Address
Logical 3 6 7
Left: Frame number; Right: Offset/frame size
address MMU 0 f1 Page size=frame size 4 8 9
011 1
1 f3 3 Bits of frame number MMU gives 5 10 11
MMU have is 011 Physical address
Page Table This table tell that
required page is in 7
frame 3.
3 3
Click Replacement
Page to edit MasterAlgorithm
title style
Explanation for Virtual memory
MMU have
Page Table Secondary Memory 0 1
MMU (containing processes) Swap in
CPU 0 0 1
0 f1 0 1
Page table update.. 1 2 3
1 -- 0 0 1
No. Page Replacement
2 4 5
CPU
If the required page is 1 2 3
not in memory Then
gives 3 6 7
Page Fault occur .
Logical Swap out
address 4 8 9
Authentication for
Security Purpose 5 10 11
If the page fault occur,
then they call trap
which give control to OS Purpose of Page Replacement: Main Memory
Operating System. • Reduce Page Faults
4 4
Click to edit Master title style
Thank You!