SlideShare a Scribd company logo
• Memory management is the crucial process of
efficiently allocating and organizing computer
memory resources to enable smooth and reliable
operation of software applications.
• It involves tasks such as allocation, DE allocation,
and tracking of memory to optimize system
performance and prevent memory-related issues.
Proper memory management is essential for the
stability and responsiveness of
computer systems.
• It is done through paging and segmentation.
• Two fundamental concepts that lie at the core of this
subject are paging and segmentation. These are the
building blocks upon which modern operating systems
and computer architectures are constructed.
• In our quest to understand the dynamic and ever-
evolving field of computer science, it is essential to
grasp the significance of these concepts. Paging and
segmentation serve as vital tools in managing memory
effectively, allowing us to run multiple applications
simultaneously, ensuring data security, and optimizing
system performance.
Dynamic Storage-Allocation Problem
• First-fit: Allocate the first hole that is big enough
• Best-fit: Allocate the smallest hole that is big enough; must
search entire list, unless ordered by size
– Produces the smallest leftover hole
• Worst-fit: Allocate the largest hole; must also search entire list
– Produces the largest leftover hole
How to satisfy a request of size n from a list of free holes?
First-fit and best-fit better than worst-fit in terms of speed and
storage utilization
Paging
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.
• Divide physical memory into fixed-sized blocks called
frames
• Divide logical memory into blocks of same size called
pages
• Keep track of all free frames
• To run a program of size N pages, need to find N free
frames and load program
• Set up a page table to translate logical to physical
addresses
Address Translation Scheme
• 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
page number page offset
p d
m -n n
Paging Hardware
Paging Model of Logical and Physical Memory
Pros and cons
pros
• Easy to use memory management algorithm
• No need for external Fragmentation
• Swapping is easy between equal-sized pages and page
frames.
cons
• Here, are drawback/ cons of Paging:
• May cause Internal fragmentation
• Page tables consume additonal memory.
• Multi-level paging may lead to memory reference
overhead.
Segmentation
In Operating Systems, Segmentation is a memory management
technique in which the memory is divided into the variable size parts.
Each part is known as a segment which can be allocated to a process.
The details about each segment are stored in a table called a
segment table.
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.
In segmentation we divides the process into the segments. Each
segment contains the same type of functions.
• such as the main function can be included in one segment and the
library functions can be included in the other segment.
Logical View of Segmentation
1
3
2
4
1
4
2
3
user space physical memory space
Translation of Logical address into
physical address by segment table
• Logical address consists of a two tuple:
<segment-number or base, offset or limit>,
• Segment-table base register (STBR) points to the segment table’s
location in memory
• Segment-table length register (STLR) indicates number of
segments used by a program;
segment number s is legal if s < STLR
Segmentation Hardware
Segmentation Hardware
Pros and cons
pros
• No internal fragmentation
• Average Segment Size is larger than the actual page size.
• Less overhead
• It is easier to relocate segments than entire address space.
• The segment table is of lesser size as compared to the page
table in paging.
cons
• It can have external fragmentation.
• it is difficult to allocate contiguous memory to variable
sized partition.
• Costly memory management algorithms
Comparison
Parameters Paging Segmentation
Individual Memory In Paging, we break a
process address space into
blocks known as pages.
In the case of Segmentation,
we break a process address
space into blocks known as
sections.
Memory Size The pages are blocks of
fixed size.
The sections are blocks of
varying sizes.
Accountability The OS divides the available
memory into individual
pages.
The compiler mainly
calculates the size of
individual segments, their
actual address as well as
virtual address.
Speed This technique is
comparatively much faster
in accessing memory.
This technique is
comparatively much slower
in accessing memory than
Paging.
Comparison
Size The available memory
determines the individual
page sizes.
The user determines the
individual segment sizes.
Fragmentation The Paging technique may
underutilize some of the
pages- thus leading to
internal fragmentation.
The Segmentation
technique may not use
some of the memory blocks
at all. Thus, it may lead to
external fragmentation.
Logical Address A logical address divides
into page offset and page
number in the case of
Paging.
A logical address divides
into section offset and
section number in the case
of Segmentation.
Data Storage In the case of Paging, the
page table leads to the
storage of the page data.
In the case of Segmentation,
the segmentation table
leads to the storage of the
segmentation data.

More Related Content

Similar to os presentation.ppt

Memory Management
Memory ManagementMemory Management
Memory Management
lavanya marichamy
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Kumar Pritam
 
07-MemoryManagement.ppt
07-MemoryManagement.ppt07-MemoryManagement.ppt
07-MemoryManagement.ppt
hello509579
 
Memory management
Memory managementMemory management
Memory management
PATELARCH
 
Segmentation in operating systems
Segmentation in operating systemsSegmentation in operating systems
Segmentation in operating systems
Dr. Jasmine Beulah Gnanadurai
 
Unit-4 swapping.pptx
Unit-4 swapping.pptxUnit-4 swapping.pptx
Unit-4 swapping.pptx
ItechAnand1
 
Presentation on Segmentation
Presentation on SegmentationPresentation on Segmentation
Presentation on Segmentation
Priyanka bisht
 
UNIT IV.pptx
UNIT IV.pptxUNIT IV.pptx
UNIT IV.pptx
YogapriyaJ1
 
Introduction to memory management
Introduction to memory managementIntroduction to memory management
Introduction to memory management
Sweety Singhal
 
Bab 4
Bab 4Bab 4
Bab 4
n k
 
Unit 5Memory management.pptx
Unit 5Memory management.pptxUnit 5Memory management.pptx
Unit 5Memory management.pptx
SourabhRaj29
 
Chapter07_ds.ppt
Chapter07_ds.pptChapter07_ds.ppt
Chapter07_ds.ppt
AvadhRakholiya3
 
Chapter 8 - Main Memory
Chapter 8 - Main MemoryChapter 8 - Main Memory
Chapter 8 - Main Memory
Wayne Jones Jnr
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
Harika Pudugosula
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
rprajat007
 
memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.ppt
footydigarse
 
16. PagingImplementIssused.pptx
16. PagingImplementIssused.pptx16. PagingImplementIssused.pptx
16. PagingImplementIssused.pptx
MyName1sJeff
 

Similar to os presentation.ppt (20)

Os4
Os4Os4
Os4
 
Os4
Os4Os4
Os4
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
07-MemoryManagement.ppt
07-MemoryManagement.ppt07-MemoryManagement.ppt
07-MemoryManagement.ppt
 
Memory management
Memory managementMemory management
Memory management
 
Segmentation in operating systems
Segmentation in operating systemsSegmentation in operating systems
Segmentation in operating systems
 
Unit-4 swapping.pptx
Unit-4 swapping.pptxUnit-4 swapping.pptx
Unit-4 swapping.pptx
 
Presentation on Segmentation
Presentation on SegmentationPresentation on Segmentation
Presentation on Segmentation
 
UNIT IV.pptx
UNIT IV.pptxUNIT IV.pptx
UNIT IV.pptx
 
Introduction to memory management
Introduction to memory managementIntroduction to memory management
Introduction to memory management
 
Bab 4
Bab 4Bab 4
Bab 4
 
Unit 5Memory management.pptx
Unit 5Memory management.pptxUnit 5Memory management.pptx
Unit 5Memory management.pptx
 
Chapter07_ds.ppt
Chapter07_ds.pptChapter07_ds.ppt
Chapter07_ds.ppt
 
Memory management
Memory managementMemory management
Memory management
 
Chapter 8 - Main Memory
Chapter 8 - Main MemoryChapter 8 - Main Memory
Chapter 8 - Main Memory
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.ppt
 
16. PagingImplementIssused.pptx
16. PagingImplementIssused.pptx16. PagingImplementIssused.pptx
16. PagingImplementIssused.pptx
 

Recently uploaded

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 

Recently uploaded (20)

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 

os presentation.ppt

  • 1. • Memory management is the crucial process of efficiently allocating and organizing computer memory resources to enable smooth and reliable operation of software applications. • It involves tasks such as allocation, DE allocation, and tracking of memory to optimize system performance and prevent memory-related issues. Proper memory management is essential for the stability and responsiveness of computer systems. • It is done through paging and segmentation.
  • 2. • Two fundamental concepts that lie at the core of this subject are paging and segmentation. These are the building blocks upon which modern operating systems and computer architectures are constructed. • In our quest to understand the dynamic and ever- evolving field of computer science, it is essential to grasp the significance of these concepts. Paging and segmentation serve as vital tools in managing memory effectively, allowing us to run multiple applications simultaneously, ensuring data security, and optimizing system performance.
  • 3. Dynamic Storage-Allocation Problem • First-fit: Allocate the first hole that is big enough • Best-fit: Allocate the smallest hole that is big enough; must search entire list, unless ordered by size – Produces the smallest leftover hole • Worst-fit: Allocate the largest hole; must also search entire list – Produces the largest leftover hole How to satisfy a request of size n from a list of free holes? First-fit and best-fit better than worst-fit in terms of speed and storage utilization
  • 4. Paging 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. • Divide physical memory into fixed-sized blocks called frames • Divide logical memory into blocks of same size called pages • Keep track of all free frames • To run a program of size N pages, need to find N free frames and load program • Set up a page table to translate logical to physical addresses
  • 5. Address Translation Scheme • 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 page number page offset p d m -n n
  • 7.
  • 8. Paging Model of Logical and Physical Memory
  • 9. Pros and cons pros • Easy to use memory management algorithm • No need for external Fragmentation • Swapping is easy between equal-sized pages and page frames. cons • Here, are drawback/ cons of Paging: • May cause Internal fragmentation • Page tables consume additonal memory. • Multi-level paging may lead to memory reference overhead.
  • 10. Segmentation In Operating Systems, Segmentation is a memory management technique in which the memory is divided into the variable size parts. Each part is known as a segment which can be allocated to a process. The details about each segment are stored in a table called a segment table. 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. In segmentation we divides the process into the segments. Each segment contains the same type of functions. • such as the main function can be included in one segment and the library functions can be included in the other segment.
  • 11. Logical View of Segmentation 1 3 2 4 1 4 2 3 user space physical memory space
  • 12. Translation of Logical address into physical address by segment table • Logical address consists of a two tuple: <segment-number or base, offset or limit>, • Segment-table base register (STBR) points to the segment table’s location in memory • Segment-table length register (STLR) indicates number of segments used by a program; segment number s is legal if s < STLR
  • 15. Pros and cons pros • No internal fragmentation • Average Segment Size is larger than the actual page size. • Less overhead • It is easier to relocate segments than entire address space. • The segment table is of lesser size as compared to the page table in paging. cons • It can have external fragmentation. • it is difficult to allocate contiguous memory to variable sized partition. • Costly memory management algorithms
  • 16. Comparison Parameters Paging Segmentation Individual Memory In Paging, we break a process address space into blocks known as pages. In the case of Segmentation, we break a process address space into blocks known as sections. Memory Size The pages are blocks of fixed size. The sections are blocks of varying sizes. Accountability The OS divides the available memory into individual pages. The compiler mainly calculates the size of individual segments, their actual address as well as virtual address. Speed This technique is comparatively much faster in accessing memory. This technique is comparatively much slower in accessing memory than Paging.
  • 17. Comparison Size The available memory determines the individual page sizes. The user determines the individual segment sizes. Fragmentation The Paging technique may underutilize some of the pages- thus leading to internal fragmentation. The Segmentation technique may not use some of the memory blocks at all. Thus, it may lead to external fragmentation. Logical Address A logical address divides into page offset and page number in the case of Paging. A logical address divides into section offset and section number in the case of Segmentation. Data Storage In the case of Paging, the page table leads to the storage of the page data. In the case of Segmentation, the segmentation table leads to the storage of the segmentation data.