SlideShare uma empresa Scribd logo
1 de 10
MEMORY MANAGEMENT
IN OPERATING SYSTEM
PREPARED BY :-
Kumar Pritam (@kpritam511)
B. Tech. (CSE)
What Is Memory Management In OS?
• Memory Management is the functionality of an operating system which handles or manages
primary memory and moves processes back and forth between main memory and disk during
execution.
• It is the most important function of an operating system that manages primary memory. It helps
processes to move back and forward between the main memory and execution disk.
• It helps OS to keep track of every memory location, irrespective of whether it is allocated to
some process or it remains free.
• Moreover, to increase performance, several processes are executed simultaneously. For this, we
must keep several processes in the main memory, so it is even more important to manage them
effectively.
Why Use Memory Management?
Here, are reasons for using Memory Management:
• It allows you to check how much memory needs to be allocated to processes that decide
which processor should get memory at what time.
• Tracks whenever inventory gets freed or unallocated. According to it will update the status.
• It allocates the space to application routines.
• It also make sure that these applications do not interfere with each other.
• Helps protect different processes from each other.
• It places the programs in memory so that memory is utilized to its full extent.
Partition Allocation
Memory is divided into different blocks or partitions. Each process is allocated according to the
requirement. Partition allocation is an ideal method to avoid internal fragmentation.
Below are the various partition allocation schemes :
• First Fit: In this type fit, the partition is allocated, which is the first sufficient block from the beginning
of the main memory.
• Best Fit: It allocates the process to the partition that is the first smallest partition among the free
partitions.
• Worst Fit: It allocates the process to the partition, which is the largest sufficient freely available
partition in the main memory.
• Next Fit: It is mostly similar to the first Fit, but this Fit, searches for the first sufficient partition from
the last allocation point. It allows you to check how much memory needs to be allocated to processes
that decide which processor should get memory at what time.
Memory Management Techniques
1) Single Contiguous Allocation:
It is the easiest memory management technique. In this method, all types of computer’s memory except a
small portion which is reserved for the OS is available for one application. Example: MS-DOS and embedded OS.
2) Partitioned Allocation:
It divides primary memory into various memory partitions, which is mostly contiguous areas of memory.
Every partition stores all the information for a specific task or job. This method consists of allotting a partition to
a job when it starts & unallocated when it ends.
3) Paged Memory Management:
This method divides the computer’s main memory into fixed-size units known as page frames. This
hardware memory management unit maps pages into frames which should be allocated on a page basis.
4) Segmented Memory Management:
Segmented memory is the only memory management method that does not provide the user’s program
with a linear and contiguous address space. Segments need hardware support in the form of a segment table.
What Is Swapping?
Swapping is a method in which the process should be swapped
temporarily from the main memory to the backing store. It will be later
brought back into the memory for continue execution.
Backing store is a hard disk or some other secondary storage device that
should be big enough in order to accommodate copies of all memory images
for all users. Here, are major benefits/pros of swapping:
• It offers a higher degree of multiprogramming.
• Allows dynamic relocation. For example, if address binding at execution
time is being used, then processes can be swap in different locations.
Else in case of compile and load time bindings, processes should be
moved to the same location.
• It helps to get better utilization of memory.
• Minimum wastage of CPU time on completion so it can easily be applied
to a priority-based scheduling method to improve its performance.
What Is Fragmentation?
Two types of Fragmentation methods are:
• External fragmentation: External fragmentation
can be reduced by rearranging memory
contents to place all free memory together in a
single block.
• Internal fragmentation: The internal
fragmentation can be reduced by assigning the
smallest partition, which is still good enough to
carry the entire process.
As processes are loaded and removed from memory, the free memory space is broken into little
pieces. It happens after sometimes that processes cannot be allocated to memory blocks considering
their small size and memory blocks remains unused. This problem is known as Fragmentation.
What Is Paging?
Paging is a technique that eliminates the
requirements of contiguous allocation of main
memory. In this, the main memory is divided into
fixed-size blocks of physical memory called frames. The
size of a frame should be kept the same as that of a
page to maximize the main memory and avoid external
fragmentation.
Here, are major benefits/pros of Paging:
• Pages reduce external fragmentation.
• Simple to implement.
• Memory efficient.
• Due to the equal size of frames, swapping becomes
very easy.
• It is used for faster access of data.
What Is Segmentation?
• Segmentation is a technique that eliminates the requirements of contiguous allocation of main
memory.
• In this, the main memory is divided into variable-size blocks of physical memory called segments. It is
based on the way the programmer follows to structure their programs.
• With segmented memory allocation, each job is divided
into several segments of different sizes, one for each
module.
• The OS maintains a segment map table for all the
processes. It also includes a list of free memory blocks
along with its size, segment numbers, and its memory
locations in the main memory or virtual memory.
• Segmentation memory management works very similar
to paging but here segments are of variable-length
where as in paging pages are of fixed size.
• Functions, subroutines, stack, array, etc., are examples of
such modules.
End OF Presentation
THANK YOU !!

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Memory management
Memory managementMemory management
Memory management
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Process management in os
Process management in osProcess management in os
Process management in os
 
File system structure
File system structureFile system structure
File system structure
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Boot process
Boot processBoot process
Boot process
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
Presentation on Segmentation
Presentation on SegmentationPresentation on Segmentation
Presentation on Segmentation
 
Process of operating system
Process of operating systemProcess of operating system
Process of operating system
 
Memory management
Memory managementMemory management
Memory management
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage Systems
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Fixed partitioning of memory
Fixed partitioning of memoryFixed partitioning of memory
Fixed partitioning of memory
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 

Semelhante a Memory Management in OS

CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management ghayour abbas
 
memory managment on computer science.ppt
memory managment on computer science.pptmemory managment on computer science.ppt
memory managment on computer science.pptfootydigarse
 
Memory Managementgggffffffffffgggggggggg
Memory ManagementgggffffffffffggggggggggMemory Managementgggffffffffffgggggggggg
Memory ManagementgggffffffffffggggggggggBHUPESHRAHANGDALE200
 
M20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptxM20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptxHarikishnaKNHk
 
07-MemoryManagement.ppt
07-MemoryManagement.ppt07-MemoryManagement.ppt
07-MemoryManagement.ppthello509579
 
Memory management
Memory managementMemory management
Memory managementPATELARCH
 
DB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDBharathi8
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptxShayanAli68
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptxRajapriya82
 
Unit 4-Memory Management - operating systems.pptx
Unit 4-Memory Management - operating systems.pptxUnit 4-Memory Management - operating systems.pptx
Unit 4-Memory Management - operating systems.pptxamaira7348
 

Semelhante a Memory Management in OS (20)

CSI-503 - 6. Memory Management
CSI-503 - 6. Memory Management CSI-503 - 6. Memory Management
CSI-503 - 6. 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
 
UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptx
 
unit5_os (1).pptx
unit5_os (1).pptxunit5_os (1).pptx
unit5_os (1).pptx
 
Os unit 3
Os unit 3Os unit 3
Os unit 3
 
Memory Managementgggffffffffffgggggggggg
Memory ManagementgggffffffffffggggggggggMemory Managementgggffffffffffgggggggggg
Memory Managementgggffffffffffgggggggggg
 
M20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptxM20CA1030_391_2_Part2.pptx
M20CA1030_391_2_Part2.pptx
 
07-MemoryManagement.ppt
07-MemoryManagement.ppt07-MemoryManagement.ppt
07-MemoryManagement.ppt
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Dynamic loading
Dynamic loadingDynamic loading
Dynamic loading
 
Memory management
Memory managementMemory management
Memory management
 
DB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdf
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
 
Module 4 memory management
Module 4 memory managementModule 4 memory management
Module 4 memory management
 
OS UNIT4.pptx
OS UNIT4.pptxOS UNIT4.pptx
OS UNIT4.pptx
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptx
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Unit 4-Memory Management - operating systems.pptx
Unit 4-Memory Management - operating systems.pptxUnit 4-Memory Management - operating systems.pptx
Unit 4-Memory Management - operating systems.pptx
 

Último

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 

Último (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 

Memory Management in OS

  • 1. MEMORY MANAGEMENT IN OPERATING SYSTEM PREPARED BY :- Kumar Pritam (@kpritam511) B. Tech. (CSE)
  • 2. What Is Memory Management In OS? • Memory Management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution. • It is the most important function of an operating system that manages primary memory. It helps processes to move back and forward between the main memory and execution disk. • It helps OS to keep track of every memory location, irrespective of whether it is allocated to some process or it remains free. • Moreover, to increase performance, several processes are executed simultaneously. For this, we must keep several processes in the main memory, so it is even more important to manage them effectively.
  • 3. Why Use Memory Management? Here, are reasons for using Memory Management: • It allows you to check how much memory needs to be allocated to processes that decide which processor should get memory at what time. • Tracks whenever inventory gets freed or unallocated. According to it will update the status. • It allocates the space to application routines. • It also make sure that these applications do not interfere with each other. • Helps protect different processes from each other. • It places the programs in memory so that memory is utilized to its full extent.
  • 4. Partition Allocation Memory is divided into different blocks or partitions. Each process is allocated according to the requirement. Partition allocation is an ideal method to avoid internal fragmentation. Below are the various partition allocation schemes : • First Fit: In this type fit, the partition is allocated, which is the first sufficient block from the beginning of the main memory. • Best Fit: It allocates the process to the partition that is the first smallest partition among the free partitions. • Worst Fit: It allocates the process to the partition, which is the largest sufficient freely available partition in the main memory. • Next Fit: It is mostly similar to the first Fit, but this Fit, searches for the first sufficient partition from the last allocation point. It allows you to check how much memory needs to be allocated to processes that decide which processor should get memory at what time.
  • 5. Memory Management Techniques 1) Single Contiguous Allocation: It is the easiest memory management technique. In this method, all types of computer’s memory except a small portion which is reserved for the OS is available for one application. Example: MS-DOS and embedded OS. 2) Partitioned Allocation: It divides primary memory into various memory partitions, which is mostly contiguous areas of memory. Every partition stores all the information for a specific task or job. This method consists of allotting a partition to a job when it starts & unallocated when it ends. 3) Paged Memory Management: This method divides the computer’s main memory into fixed-size units known as page frames. This hardware memory management unit maps pages into frames which should be allocated on a page basis. 4) Segmented Memory Management: Segmented memory is the only memory management method that does not provide the user’s program with a linear and contiguous address space. Segments need hardware support in the form of a segment table.
  • 6. What Is Swapping? Swapping is a method in which the process should be swapped temporarily from the main memory to the backing store. It will be later brought back into the memory for continue execution. Backing store is a hard disk or some other secondary storage device that should be big enough in order to accommodate copies of all memory images for all users. Here, are major benefits/pros of swapping: • It offers a higher degree of multiprogramming. • Allows dynamic relocation. For example, if address binding at execution time is being used, then processes can be swap in different locations. Else in case of compile and load time bindings, processes should be moved to the same location. • It helps to get better utilization of memory. • Minimum wastage of CPU time on completion so it can easily be applied to a priority-based scheduling method to improve its performance.
  • 7. What Is Fragmentation? Two types of Fragmentation methods are: • External fragmentation: External fragmentation can be reduced by rearranging memory contents to place all free memory together in a single block. • Internal fragmentation: The internal fragmentation can be reduced by assigning the smallest partition, which is still good enough to carry the entire process. As processes are loaded and removed from memory, the free memory space is broken into little pieces. It happens after sometimes that processes cannot be allocated to memory blocks considering their small size and memory blocks remains unused. This problem is known as Fragmentation.
  • 8. What Is Paging? Paging is a technique that eliminates the requirements of contiguous allocation of main memory. In this, the main memory is divided into fixed-size blocks of physical memory called frames. The size of a frame should be kept the same as that of a page to maximize the main memory and avoid external fragmentation. Here, are major benefits/pros of Paging: • Pages reduce external fragmentation. • Simple to implement. • Memory efficient. • Due to the equal size of frames, swapping becomes very easy. • It is used for faster access of data.
  • 9. What Is Segmentation? • Segmentation is a technique that eliminates the requirements of contiguous allocation of main memory. • In this, the main memory is divided into variable-size blocks of physical memory called segments. It is based on the way the programmer follows to structure their programs. • With segmented memory allocation, each job is divided into several segments of different sizes, one for each module. • The OS maintains a segment map table for all the processes. It also includes a list of free memory blocks along with its size, segment numbers, and its memory locations in the main memory or virtual memory. • Segmentation memory management works very similar to paging but here segments are of variable-length where as in paging pages are of fixed size. • Functions, subroutines, stack, array, etc., are examples of such modules.