SlideShare a Scribd company logo
Unit II - Storage management
 Logical Address is generated by CPU while a program is
running.
 The logical address is virtual address as it does not exist
physically, therefore, it is also known as Virtual Address.
 This address is used as a reference to access the physical
memory location by CPU.
 The term Logical Address Space is used for the set of all
logical addresses generated by a program’s perspective.
 The hardware device called Memory-Management Unit is
used for mapping logical address to its corresponding
physical address.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
Differ in execution time
 It identifies a physical location of required data in a
memory.
 The user never directly deals with the physical
address but can access by its corresponding logical
address.
 The program needs physical memory for its
execution, therefore, the logical address must be
mapped to the physical address by MMU before they
are used.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
Parameter LOGICAL ADDRESS PHYSICAL ADDRESS
Basic generated by CPU
location in a memory
unit
Visibility
User can view the logical
address of a program.
User can never view
physical address of
program.
Generation generated by the CPU Computed by MMU
Access
The user can use the logical
address to access the physical
address.
The user can indirectly
access physical
address but not
directly.
Editable Logical address can be change.
Physical address will
not change.
Also called virtual address. real address.
 Swapping is a memory management scheme in
which any process can be temporarily
swapped from main memory to secondary
memory so that the main memory can be made
available for other processes.
 It is used to improve main memory utilization.
 In secondary memory, the place where the
swapped-out process is stored is called swap
space.
 It is the type of memory allocation
method. When a process requests the memory,
a single contiguous section of memory blocks
is allotted depending on its requirements.
Fixed-size Partition Scheme
 In this type of contiguous memory allocation
technique, each process is allotted a fixed size
continuous block in the main memory.
 This technique is also called static partitioning.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
Variable-size Partition
 In this type of contiguous memory allocation
technique, no fixed blocks or partitions are made in
the memory.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 In Operating Systems, Paging is a storage
mechanism used to retrieve processes from the
secondary storage into the main memory in the form
of pages.
 The main idea behind the paging is to divide each
process in the form of pages. The main memory will
also be divided in the form of frames.
 One page of the process is to be stored in one of the
frames of the memory.
 The partitions of secondary memory are called
as pages.
 The partitions of main memory are called
as frames.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 Address generated by CPU is divided into:
◦ Page number (p) - used as an index into a page table
which contains base address of each page in physical
memory.
◦ Page offset (d) - combined with base address to define
the physical memory address that is sent to the memory
unit. It refers to the number of bits necessary to
represent a certain word on a page, For ex: 10 bits
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 Segmentation method works almost similarly
to paging, only difference between the two is
that segments are of variable-length whereas,
in the paging method, pages are always of
fixed size.
Segment table contains mainly two information
about segment:
 Base: It is the base address of the segment
 Limit: It is the length of the segment.
Example of Segmentation in OS
 Consider that a user program has been divided into
five segments and they are numbered from segment 0
to segment 4, as you can see them in the logical
address space.
 You also have a segment table which has entries for
these segment with their base address in physical
memory and their limit.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 Virtual memory is a memory management
technique where secondary memory can be
used as if it were a part of the main memory.

STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 Demand paging is a memory management
scheme employed by modern operating
systems to manage physical memory
resources.
 Demand paging is a process in which data is moved
from secondary memory to RAM on a demand basis,
which means all data is not stored in the main
memory because the space is limited in RAM.
 Demand Paging is a method in which a page is
only brought into main memory when the CPU
requests it.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 In an operating system that uses paging for memory
management, a page replacement algorithm is
needed to decide which page needs to be replaced
when a new page comes in.
FIFO
LRU
OPTIMAL
Page Replacement Algorithms:
 Page fault/ Miss: If the searching page is not in
memory
 Page Hit: If the searching page that was available in
memory.
 This is the simplest page replacement
algorithm.
 Replaced the pages that has been in memory
for the longest time
Example 1: Consider page reference string
1, 3, 0, 3, 5, 6, 3 with 3 page frames. Find the
number of page faults.
Advantages
 This algorithm is simple and easy to use.
 FIFO does not cause more overhead.
Disadvantages
 This algorithm does not make the use of the frequency
of last used time rather it just replaces the Oldest
Page.
 There is an increase in page faults as page frames
increases.
 The performance of this algorithm is the worst.
 In this algorithm, pages are replaced which would not be
used for the longest duration of time in the future
Advantages of OPR
 This algorithm is easy to use.
 This algorithm provides excellent efficiency and is less
complex.
 For the best result, the implementation of data structures is
very easy
Disadvantages of OPR
 Practical Implementation is not possible because the
operating system is unable to track the future request
Example-2: Consider the page references 7, 0, 1, 2, 0, 3, 0, 4,
2, 3, 0, 3, 2, 3 with 4 page frame. Find number of page fault.
 In this algorithm, page will be replaced which is least
recently(Long back) used.
 The page that has not been used for the longest time
in the main memory will be selected for replacement.
 This algorithm is easy to implement.
 Example-3: Consider the page reference
string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 3
with 4 page frames. Find number of page
faults.
Advantages of LRU
 It is an efficient technique.
 With this algorithm, it becomes easy to identify the
faulty pages that are not needed for a long time.
 It helps in Full analysis.
Disadvantages of LRU
 It is expensive and has more complexity.
 There is a need for an additional data structure.
 In this algorithm, page will be replaced which has
been used recently.
 This is the Last in First Out algorithm and works
on LIFO principles.
 In this algorithm, the newest page is replaced by the
requested page.
Example: Let’s see how the LIFO performs for
our example string of 3, 1, 2, 1, 6, 5, 1, 3 with
3-page frames:
Advantages
 Simple implementation:
 Low overhead:
Disadvantages
 Poor performance:
 May result in page thrashing: LIFO page
replacement algorithm can result in a situation known
as page thrashing, where the pages are frequently
swapped in and out of memory, leading to high page
fault rates and poor system performance.
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 THANK YOU

More Related Content

PPTX
Os unit 2
PPTX
Paging +Algorithem+Segmentation+memory management
PPTX
os memory management unit iii memory.pptx
PDF
An input enhancement technique to maximize the performance of page replacemen...
PPT
Memory management
PPTX
Virtual Memory in Operating System
DOCX
virtual memory
PPTX
Virtual Memory
Os unit 2
Paging +Algorithem+Segmentation+memory management
os memory management unit iii memory.pptx
An input enhancement technique to maximize the performance of page replacemen...
Memory management
Virtual Memory in Operating System
virtual memory
Virtual Memory

Similar to STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx (20)

PPTX
Page replacement
PDF
CSI-503 - 9. Virtual Memory
PPTX
Abhaycavirtual memory and the pagehit.pptx
PDF
final_unit_6_spos_notes_2023/24 pattern.pdf
PPTX
unit5_os (1).pptx
PPTX
operating system notes about virtual memory 4.pptx
PDF
CSI-503 - 8.Paging and Segmentation
PPTX
coafinal1-copy-150430204758-conversion-gate01.pptx
PPT
Unit 5 Memory management System in OS.ppt
PDF
Virtual+Cache_Memory Operation System...
PPT
Unit 2chapter 2 memory mgmt complete
PPTX
Page replacement_Architecture ppt (213015018+213015017).pptx
PPT
Understanding operating systems 5th ed ch03
PPTX
virtual memory
PPTX
Unit 5 Memory management in OS Unit 5 Memory management in OS
PDF
Adobe Scan 06-Jan-2023.pdf demand paging document
PPT
PPT
Ch10 OS
 
Page replacement
CSI-503 - 9. Virtual Memory
Abhaycavirtual memory and the pagehit.pptx
final_unit_6_spos_notes_2023/24 pattern.pdf
unit5_os (1).pptx
operating system notes about virtual memory 4.pptx
CSI-503 - 8.Paging and Segmentation
coafinal1-copy-150430204758-conversion-gate01.pptx
Unit 5 Memory management System in OS.ppt
Virtual+Cache_Memory Operation System...
Unit 2chapter 2 memory mgmt complete
Page replacement_Architecture ppt (213015018+213015017).pptx
Understanding operating systems 5th ed ch03
virtual memory
Unit 5 Memory management in OS Unit 5 Memory management in OS
Adobe Scan 06-Jan-2023.pdf demand paging document
Ch10 OS
 
Ad

More from DivyaKS18 (11)

PPTX
Classes, Inheritance ,Packages & Interfaces.pptx
PPT
UNIX.ppt
PPTX
System calls in OS.pptx
PPTX
PROCESS.pptx
PPTX
OS introduction.pptx
PPTX
exception -ppt.pptx
PPTX
DES
PPTX
monte carlo simulation
PPT
mac-protocols
PPT
SMTP and TCP protocol
PPTX
Multithreading -Thread Fundamentals6.pptx
Classes, Inheritance ,Packages & Interfaces.pptx
UNIX.ppt
System calls in OS.pptx
PROCESS.pptx
OS introduction.pptx
exception -ppt.pptx
DES
monte carlo simulation
mac-protocols
SMTP and TCP protocol
Multithreading -Thread Fundamentals6.pptx
Ad

Recently uploaded (20)

PPTX
Cell Types and Its function , kingdom of life
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Lesson notes of climatology university.
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Empowerment Technology for Senior High School Guide
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Computing-Curriculum for Schools in Ghana
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Introduction to Building Materials
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Cell Types and Its function , kingdom of life
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Lesson notes of climatology university.
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Unit 4 Skeletal System.ppt.pptxopresentatiom
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Empowerment Technology for Senior High School Guide
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Computing-Curriculum for Schools in Ghana
A systematic review of self-coping strategies used by university students to ...
Supply Chain Operations Speaking Notes -ICLT Program
Indian roads congress 037 - 2012 Flexible pavement
Introduction to Building Materials
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Orientation - ARALprogram of Deped to the Parents.pptx
Complications of Minimal Access Surgery at WLH
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE

STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx

  • 1. Unit II - Storage management
  • 2.  Logical Address is generated by CPU while a program is running.  The logical address is virtual address as it does not exist physically, therefore, it is also known as Virtual Address.  This address is used as a reference to access the physical memory location by CPU.  The term Logical Address Space is used for the set of all logical addresses generated by a program’s perspective.  The hardware device called Memory-Management Unit is used for mapping logical address to its corresponding physical address.
  • 5.  It identifies a physical location of required data in a memory.  The user never directly deals with the physical address but can access by its corresponding logical address.  The program needs physical memory for its execution, therefore, the logical address must be mapped to the physical address by MMU before they are used.
  • 8. Parameter LOGICAL ADDRESS PHYSICAL ADDRESS Basic generated by CPU location in a memory unit Visibility User can view the logical address of a program. User can never view physical address of program. Generation generated by the CPU Computed by MMU Access The user can use the logical address to access the physical address. The user can indirectly access physical address but not directly. Editable Logical address can be change. Physical address will not change. Also called virtual address. real address.
  • 9.  Swapping is a memory management scheme in which any process can be temporarily swapped from main memory to secondary memory so that the main memory can be made available for other processes.  It is used to improve main memory utilization.  In secondary memory, the place where the swapped-out process is stored is called swap space.
  • 10.  It is the type of memory allocation method. When a process requests the memory, a single contiguous section of memory blocks is allotted depending on its requirements.
  • 11. Fixed-size Partition Scheme  In this type of contiguous memory allocation technique, each process is allotted a fixed size continuous block in the main memory.  This technique is also called static partitioning.
  • 13. Variable-size Partition  In this type of contiguous memory allocation technique, no fixed blocks or partitions are made in the memory.
  • 15.  In Operating Systems, Paging is a storage mechanism used to retrieve processes from the secondary storage into the main memory in the form of pages.  The main idea behind the paging is to divide each process in the form of pages. The main memory will also be divided in the form of frames.  One page of the process is to be stored in one of the frames of the memory.
  • 16.  The partitions of secondary memory are called as pages.  The partitions of main memory are called as frames.
  • 19.  Address generated by CPU is divided into: ◦ Page number (p) - used as an index into a page table which contains base address of each page in physical memory. ◦ Page offset (d) - combined with base address to define the physical memory address that is sent to the memory unit. It refers to the number of bits necessary to represent a certain word on a page, For ex: 10 bits
  • 21.  Segmentation method works almost similarly to paging, only difference between the two is that segments are of variable-length whereas, in the paging method, pages are always of fixed size.
  • 22. Segment table contains mainly two information about segment:  Base: It is the base address of the segment  Limit: It is the length of the segment.
  • 23. Example of Segmentation in OS  Consider that a user program has been divided into five segments and they are numbered from segment 0 to segment 4, as you can see them in the logical address space.  You also have a segment table which has entries for these segment with their base address in physical memory and their limit.
  • 25.  Virtual memory is a memory management technique where secondary memory can be used as if it were a part of the main memory. 
  • 27.  Demand paging is a memory management scheme employed by modern operating systems to manage physical memory resources.
  • 28.  Demand paging is a process in which data is moved from secondary memory to RAM on a demand basis, which means all data is not stored in the main memory because the space is limited in RAM.
  • 29.  Demand Paging is a method in which a page is only brought into main memory when the CPU requests it.
  • 32.  In an operating system that uses paging for memory management, a page replacement algorithm is needed to decide which page needs to be replaced when a new page comes in. FIFO LRU OPTIMAL
  • 33. Page Replacement Algorithms:  Page fault/ Miss: If the searching page is not in memory  Page Hit: If the searching page that was available in memory.
  • 34.  This is the simplest page replacement algorithm.  Replaced the pages that has been in memory for the longest time
  • 35. Example 1: Consider page reference string 1, 3, 0, 3, 5, 6, 3 with 3 page frames. Find the number of page faults.
  • 36. Advantages  This algorithm is simple and easy to use.  FIFO does not cause more overhead. Disadvantages  This algorithm does not make the use of the frequency of last used time rather it just replaces the Oldest Page.  There is an increase in page faults as page frames increases.  The performance of this algorithm is the worst.
  • 37.  In this algorithm, pages are replaced which would not be used for the longest duration of time in the future Advantages of OPR  This algorithm is easy to use.  This algorithm provides excellent efficiency and is less complex.  For the best result, the implementation of data structures is very easy Disadvantages of OPR  Practical Implementation is not possible because the operating system is unable to track the future request
  • 38. Example-2: Consider the page references 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 3 with 4 page frame. Find number of page fault.
  • 39.  In this algorithm, page will be replaced which is least recently(Long back) used.  The page that has not been used for the longest time in the main memory will be selected for replacement.  This algorithm is easy to implement.
  • 40.  Example-3: Consider the page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 3 with 4 page frames. Find number of page faults.
  • 41. Advantages of LRU  It is an efficient technique.  With this algorithm, it becomes easy to identify the faulty pages that are not needed for a long time.  It helps in Full analysis. Disadvantages of LRU  It is expensive and has more complexity.  There is a need for an additional data structure.
  • 42.  In this algorithm, page will be replaced which has been used recently.  This is the Last in First Out algorithm and works on LIFO principles.  In this algorithm, the newest page is replaced by the requested page.
  • 43. Example: Let’s see how the LIFO performs for our example string of 3, 1, 2, 1, 6, 5, 1, 3 with 3-page frames:
  • 44. Advantages  Simple implementation:  Low overhead: Disadvantages  Poor performance:  May result in page thrashing: LIFO page replacement algorithm can result in a situation known as page thrashing, where the pages are frequently swapped in and out of memory, leading to high page fault rates and poor system performance.