SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Presentation Title
Serial No.                               Topics
    1        Introduction to Memory & Memory hierarchy
    2        Introduction to MMU & its working
    3        Techniques of Memory Management( Paging and segmentation)
    4        segmentation
    5        Mono programming without Swapping or Paging (M. Fayyaz)
    6        Multiprogramming with fixed partitions. (M.Bilal)
    7        Swapping
    8        Managing Free Memory (Hiba Abdul Rauf)
    9        Memory Management with Bitmaps
   10        Dynamic Partitioning Placement Algorithm (Imran Bin Ramzan)
Memory is the internal storage area of the computer. Memory identifies
the data storage. The physical memory usually referred to us main
memory or RAM.
Memory Management Unit of the operating system handles the
memory hierarchy.



1. Keep track of what parts of memory are in use.
2. Allocate memory to processes when needed.
3. Deallocate when processes are done.
4. Swapping, or paging, between main memory and disk, when disk is
too small to hold all current processes.
Itโ€™s a term used to describe how operating systems handles the available RAM, it is
managed by multiple levels.


                          Techniques of M.M
In segmentation the virtual address space is divided into a number of variable-size
pieces called segments. One can view the designs we have studied so far as having
just one segment, the entire address space of the process.

Memory Management Scheme that supports user view of memory.
A program is a collection of segments.
A segment is a logical unit such as
          main program, procedure, function
          local variables, global variables, common block
          stack, arrays
       Protect each entity independently
       Allow each segment to grow independently
       Share each segment independently
1
                 2


 1
             4


             2   4
3

                 3




User Space       Physical Memory
โ€“ Logical address consists of a two tuple
        <segment-number, offset>
โ€“ Segment Table
    โ€ข Maps two-dimensional user-defined addresses into one-dimensional
      physical addresses. Each table entry has
        โ€“ Base - contains the starting physical address where the segments
          reside in memory.
        โ€“ Limit - specifies the length of the segment.
    โ€ข Segment-table base register (STBR) points to the segment tableโ€™s
      location in memory.
    โ€ข Segment-table length register (STLR) indicates the number of
      segments used by a program; segment number is legal if s < STLR.
Segmentation Architecture (cont.)


โ€“ Relocation is dynamic - by segment table
โ€“ Sharing
   โ€ข Code sharing occurs at the segment level.
   โ€ข Shared segments must have same segment number.
โ€“ Allocation - dynamic storage allocation problem
   โ€ข use best fit/first fit, may cause external fragmentation.
โ€“ Protection
   โ€ข protection bits associated with segments
      โ€“ read/write/execute privileges
      โ€“ array in a separate segment - hardware can check for illegal
        array indexes.
Shared segments

                                                       Limit  Base
             editor                                      25286 43602
                                                   0      4425 68348
           segment 0                               1                           43062
                          data 1                            Segment Table              editor
                                                             process P1        68348
                                                                                       data 1
                      segment 1                                                72773
Logical Memory
 process P1


                            editor                           Limit  Base
                                                               25286 43602     900
                                          data 2        0                              data 2
                          segment 0
                                                        1
                                                                8850 90003     03
                                                                               985
                                                               Segment Table
                                                                               53
        Logical Memory                                          process P2
         process P2                  segment 1
Segmented Paged Memory


โ€“ Segment-table entry contains not the base address of
  the segment, but the base address of a page table for
  this segment.
   โ€ข Overcomes external fragmentation problem of segmented
     memory.
   โ€ข Paging also makes allocation simpler; time to search for a
     suitable segment (using best-fit etc.) reduced.
   โ€ข Introduces some internal fragmentation and table space
     overhead.
โ€“ Multics - single level page table
โ€“ IBM OS/2 - OS on top of Intel 386
   โ€ข uses a two level paging scheme
Entire process remains in memory from start to finish.
The sum of the memory requirements of all jobs in the system
cannot exceed the size of physical memory.




   These are three simple ways of organizing memory an
   operating system with one user process
โ€ขAllocating space for growing data segment
โ€ขAllocating space for growing stack & data segment
Managing Free Memory
When memory is assigned dynamically, the operating system must manage
it. In general terms, there are two ways to keep track of memory usage:
bitmaps and free lists. In this section and the next one we will look at these
two methods.
Operating system must decide which free block to allocate to a process


Best-fit algorithm
    Chooses the block that is closest in size to the request
    Worst performer overall
    Since smallest block is found for process, the smallest
  amount of fragmentation is left
    Memory compaction must be done more often
First-fit algorithm
     Scans memory form the beginning and chooses
   the first available block that is large enough
     Fastest
     May have many process loaded in the front end
   of memory that must be searched over when
   trying to find a free block
Next-fit-Algorithm
    Scans memory from the location of the last
  placement
    More often allocate a block of memory at the
  end of memory where the largest block is found
    The largest block of memory is broken up into
  smaller blocks
    Compaction is required to obtain a large block
  at the end of memory
Worst Fit Algorithm:
 Search entire list.
  Produces the largest left over hole.
 Allocate the largest hole.
Memory management
Memory management

Weitere รคhnliche Inhalte

Was ist angesagt?

Demand paging
Demand pagingDemand paging
Demand pagingTrinity Dwarka
ย 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
ย 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
ย 
Memory Organization
Memory OrganizationMemory Organization
Memory OrganizationKamal Acharya
ย 
Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecturePiyush Mittal
ย 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architectureArpan Baishya
ย 
Computer architecture multi processor
Computer architecture multi processorComputer architecture multi processor
Computer architecture multi processorMazin Alwaaly
ย 
Unit 5 Advanced Computer Architecture
Unit 5 Advanced Computer ArchitectureUnit 5 Advanced Computer Architecture
Unit 5 Advanced Computer ArchitectureBalaji Vignesh
ย 
Memory organization
Memory organizationMemory organization
Memory organizationDhaval Bagal
ย 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memorysgpraju
ย 
Direct memory access
Direct memory accessDirect memory access
Direct memory accessshubham kuwar
ย 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formatsMazin Alwaaly
ย 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptmali yogesh kumar
ย 
Cache memory
Cache memoryCache memory
Cache memoryAnsari Maviya
ย 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memoryDeepak John
ย 
Memory (Computer Organization)
Memory (Computer Organization)Memory (Computer Organization)
Memory (Computer Organization)JyotiprakashMishra18
ย 
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chipsAnuj Modi
ย 
Os Threads
Os ThreadsOs Threads
Os ThreadsSalman Memon
ย 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
ย 
Disk scheduling
Disk schedulingDisk scheduling
Disk schedulingNEERAJ BAGHEL
ย 

Was ist angesagt? (20)

Demand paging
Demand pagingDemand paging
Demand paging
ย 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
ย 
Cache memory
Cache memoryCache memory
Cache memory
ย 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
ย 
Multi core-architecture
Multi core-architectureMulti core-architecture
Multi core-architecture
ย 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
ย 
Computer architecture multi processor
Computer architecture multi processorComputer architecture multi processor
Computer architecture multi processor
ย 
Unit 5 Advanced Computer Architecture
Unit 5 Advanced Computer ArchitectureUnit 5 Advanced Computer Architecture
Unit 5 Advanced Computer Architecture
ย 
Memory organization
Memory organizationMemory organization
Memory organization
ย 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
ย 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
ย 
Computer architecture addressing modes and formats
Computer architecture addressing modes and formatsComputer architecture addressing modes and formats
Computer architecture addressing modes and formats
ย 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
ย 
Cache memory
Cache memoryCache memory
Cache memory
ย 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
ย 
Memory (Computer Organization)
Memory (Computer Organization)Memory (Computer Organization)
Memory (Computer Organization)
ย 
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chips
ย 
Os Threads
Os ThreadsOs Threads
Os Threads
ย 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
ย 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
ย 

Andere mochten auch

Array Processor
Array ProcessorArray Processor
Array ProcessorAnshuman Biswal
ย 
Organising - MANAGEMENT PROCESS
Organising - MANAGEMENT PROCESSOrganising - MANAGEMENT PROCESS
Organising - MANAGEMENT PROCESSRamasubramanian H (HRS)
ย 
Process management in os
Process management in osProcess management in os
Process management in osMiong Lazaro
ย 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryaaina_katyal
ย 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory ManagementAkmal Cikmat
ย 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and PagingEmery Berger
ย 
Process management
Process managementProcess management
Process managementBirju Tank
ย 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating SystemRaj Mohan
ย 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processingKamal Acharya
ย 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentationPiyush Rochwani
ย 
Memory management
Memory managementMemory management
Memory managementVishal Singh
ย 

Andere mochten auch (14)

Array Processor
Array ProcessorArray Processor
Array Processor
ย 
Organising - MANAGEMENT PROCESS
Organising - MANAGEMENT PROCESSOrganising - MANAGEMENT PROCESS
Organising - MANAGEMENT PROCESS
ย 
Process management in os
Process management in osProcess management in os
Process management in os
ย 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
ย 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
ย 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
ย 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and Paging
ย 
Process management
Process managementProcess management
Process management
ย 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
ย 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
ย 
Processes of management
Processes of managementProcesses of management
Processes of management
ย 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
ย 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
ย 
Memory management
Memory managementMemory management
Memory management
ย 

ร„hnlich wie Memory management

UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptxssusera387fd1
ย 
Main Memory
Main MemoryMain Memory
Main MemoryUsama ahmad
ย 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory managementJohan Granados Montero
ย 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementkazim Hussain
ย 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Managementdonny101
ย 
Bab 4
Bab 4Bab 4
Bab 4n k
ย 
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP Ops
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP OpsIRJET - The 3-Level Database Architectural Design for OLAP and OLTP Ops
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP OpsIRJET Journal
ย 
Introduction to Memoria
Introduction to MemoriaIntroduction to Memoria
Introduction to MemoriaVictor Smirnov
ย 
PAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxPAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxImranBhatti58
ย 
Memory comp
Memory compMemory comp
Memory compMohansonale1
ย 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory HierarchySURBHI SAROHA
ย 
Memory management
Memory managementMemory management
Memory managementPATELARCH
ย 
Cache memory
Cache memoryCache memory
Cache memoryMohanChimanna
ย 
local_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxlocal_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxLyn B
ย 
DB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDBharathi8
ย 
Operating system 34 contiguous allocation
Operating system 34 contiguous allocationOperating system 34 contiguous allocation
Operating system 34 contiguous allocationVaibhav Khanna
ย 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and SegmentationMadhur Gupta
ย 

ร„hnlich wie Memory management (20)

UNIT-2 OS.pptx
UNIT-2 OS.pptxUNIT-2 OS.pptx
UNIT-2 OS.pptx
ย 
Memory management OS
Memory management OSMemory management OS
Memory management OS
ย 
Main Memory
Main MemoryMain Memory
Main Memory
ย 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
ย 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
ย 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Management
ย 
Bab 4
Bab 4Bab 4
Bab 4
ย 
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP Ops
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP OpsIRJET - The 3-Level Database Architectural Design for OLAP and OLTP Ops
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP Ops
ย 
Introduction to Memoria
Introduction to MemoriaIntroduction to Memoria
Introduction to Memoria
ย 
PAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxPAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docx
ย 
Memory comp
Memory compMemory comp
Memory comp
ย 
Segmentation
SegmentationSegmentation
Segmentation
ย 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
ย 
Memory management
Memory managementMemory management
Memory management
ย 
Cache memory
Cache memoryCache memory
Cache memory
ย 
local_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptxlocal_media3192961381667787861026781.pptx
local_media3192961381667787861026781.pptx
ย 
Os
OsOs
Os
ย 
DB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdfDB ppt OS unit - 3.pdf
DB ppt OS unit - 3.pdf
ย 
Operating system 34 contiguous allocation
Operating system 34 contiguous allocationOperating system 34 contiguous allocation
Operating system 34 contiguous allocation
ย 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentation
ย 

Mehr von Muhammad Fayyaz

need order on fiverr.pdf
need order on fiverr.pdfneed order on fiverr.pdf
need order on fiverr.pdfMuhammad Fayyaz
ย 
10 productivity booster hotkeys of Elmentor Page Builder.pdf
10 productivity booster hotkeys of Elmentor Page Builder.pdf10 productivity booster hotkeys of Elmentor Page Builder.pdf
10 productivity booster hotkeys of Elmentor Page Builder.pdfMuhammad Fayyaz
ย 
WPForms Plugin Review 2023 - Everything you need to know!
WPForms Plugin Review 2023 -  Everything you need to know!WPForms Plugin Review 2023 -  Everything you need to know!
WPForms Plugin Review 2023 - Everything you need to know!Muhammad Fayyaz
ย 
how to keep wordpress website secured.pdf
how to keep wordpress website secured.pdfhow to keep wordpress website secured.pdf
how to keep wordpress website secured.pdfMuhammad Fayyaz
ย 
Networking essentials
Networking essentialsNetworking essentials
Networking essentialsMuhammad Fayyaz
ย 
Pak America Rationships
Pak America RationshipsPak America Rationships
Pak America RationshipsMuhammad Fayyaz
ย 

Mehr von Muhammad Fayyaz (7)

need order on fiverr.pdf
need order on fiverr.pdfneed order on fiverr.pdf
need order on fiverr.pdf
ย 
10 productivity booster hotkeys of Elmentor Page Builder.pdf
10 productivity booster hotkeys of Elmentor Page Builder.pdf10 productivity booster hotkeys of Elmentor Page Builder.pdf
10 productivity booster hotkeys of Elmentor Page Builder.pdf
ย 
WPForms Plugin Review 2023 - Everything you need to know!
WPForms Plugin Review 2023 -  Everything you need to know!WPForms Plugin Review 2023 -  Everything you need to know!
WPForms Plugin Review 2023 - Everything you need to know!
ย 
how to keep wordpress website secured.pdf
how to keep wordpress website secured.pdfhow to keep wordpress website secured.pdf
how to keep wordpress website secured.pdf
ย 
Networking essentials
Networking essentialsNetworking essentials
Networking essentials
ย 
Brainstorming
BrainstormingBrainstorming
Brainstorming
ย 
Pak America Rationships
Pak America RationshipsPak America Rationships
Pak America Rationships
ย 

Kรผrzlich hochgeladen

Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
ย 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
ย 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
ย 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
ย 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
ย 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
ย 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
ย 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
ย 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
ย 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
ย 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
ย 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
ย 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
ย 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
ย 
Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...
Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...
Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...Nguyen Thanh Tu Collection
ย 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
ย 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
ย 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
ย 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
ย 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
ย 

Kรผrzlich hochgeladen (20)

Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
ย 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
ย 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
ย 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
ย 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
ย 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
ย 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
ย 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
ย 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
ย 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
ย 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
ย 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
ย 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ย 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
ย 
Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...
Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...
Tแป”NG ร”N TแบฌP THI Vร€O LแปšP 10 Mร”N TIแบพNG ANH Nฤ‚M HแปŒC 2023 - 2024 Cร“ ฤรP รN (NGแปฎ ร‚...
ย 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
ย 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
ย 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
ย 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
ย 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
ย 

Memory management

  • 2.
  • 3. Serial No. Topics 1 Introduction to Memory & Memory hierarchy 2 Introduction to MMU & its working 3 Techniques of Memory Management( Paging and segmentation) 4 segmentation 5 Mono programming without Swapping or Paging (M. Fayyaz) 6 Multiprogramming with fixed partitions. (M.Bilal) 7 Swapping 8 Managing Free Memory (Hiba Abdul Rauf) 9 Memory Management with Bitmaps 10 Dynamic Partitioning Placement Algorithm (Imran Bin Ramzan)
  • 4. Memory is the internal storage area of the computer. Memory identifies the data storage. The physical memory usually referred to us main memory or RAM.
  • 5. Memory Management Unit of the operating system handles the memory hierarchy. 1. Keep track of what parts of memory are in use. 2. Allocate memory to processes when needed. 3. Deallocate when processes are done. 4. Swapping, or paging, between main memory and disk, when disk is too small to hold all current processes.
  • 6. Itโ€™s a term used to describe how operating systems handles the available RAM, it is managed by multiple levels. Techniques of M.M
  • 7. In segmentation the virtual address space is divided into a number of variable-size pieces called segments. One can view the designs we have studied so far as having just one segment, the entire address space of the process. Memory Management Scheme that supports user view of memory. A program is a collection of segments. A segment is a logical unit such as main program, procedure, function local variables, global variables, common block stack, arrays Protect each entity independently Allow each segment to grow independently Share each segment independently
  • 8. 1 2 1 4 2 4 3 3 User Space Physical Memory
  • 9. โ€“ Logical address consists of a two tuple <segment-number, offset> โ€“ Segment Table โ€ข Maps two-dimensional user-defined addresses into one-dimensional physical addresses. Each table entry has โ€“ Base - contains the starting physical address where the segments reside in memory. โ€“ Limit - specifies the length of the segment. โ€ข Segment-table base register (STBR) points to the segment tableโ€™s location in memory. โ€ข Segment-table length register (STLR) indicates the number of segments used by a program; segment number is legal if s < STLR.
  • 10. Segmentation Architecture (cont.) โ€“ Relocation is dynamic - by segment table โ€“ Sharing โ€ข Code sharing occurs at the segment level. โ€ข Shared segments must have same segment number. โ€“ Allocation - dynamic storage allocation problem โ€ข use best fit/first fit, may cause external fragmentation. โ€“ Protection โ€ข protection bits associated with segments โ€“ read/write/execute privileges โ€“ array in a separate segment - hardware can check for illegal array indexes.
  • 11. Shared segments Limit Base editor 25286 43602 0 4425 68348 segment 0 1 43062 data 1 Segment Table editor process P1 68348 data 1 segment 1 72773 Logical Memory process P1 editor Limit Base 25286 43602 900 data 2 0 data 2 segment 0 1 8850 90003 03 985 Segment Table 53 Logical Memory process P2 process P2 segment 1
  • 12. Segmented Paged Memory โ€“ Segment-table entry contains not the base address of the segment, but the base address of a page table for this segment. โ€ข Overcomes external fragmentation problem of segmented memory. โ€ข Paging also makes allocation simpler; time to search for a suitable segment (using best-fit etc.) reduced. โ€ข Introduces some internal fragmentation and table space overhead. โ€“ Multics - single level page table โ€“ IBM OS/2 - OS on top of Intel 386 โ€ข uses a two level paging scheme
  • 13. Entire process remains in memory from start to finish. The sum of the memory requirements of all jobs in the system cannot exceed the size of physical memory. These are three simple ways of organizing memory an operating system with one user process
  • 14.
  • 15.
  • 16. โ€ขAllocating space for growing data segment โ€ขAllocating space for growing stack & data segment
  • 17.
  • 18. Managing Free Memory When memory is assigned dynamically, the operating system must manage it. In general terms, there are two ways to keep track of memory usage: bitmaps and free lists. In this section and the next one we will look at these two methods.
  • 19.
  • 20. Operating system must decide which free block to allocate to a process Best-fit algorithm Chooses the block that is closest in size to the request Worst performer overall Since smallest block is found for process, the smallest amount of fragmentation is left Memory compaction must be done more often
  • 21. First-fit algorithm Scans memory form the beginning and chooses the first available block that is large enough Fastest May have many process loaded in the front end of memory that must be searched over when trying to find a free block
  • 22. Next-fit-Algorithm Scans memory from the location of the last placement More often allocate a block of memory at the end of memory where the largest block is found The largest block of memory is broken up into smaller blocks Compaction is required to obtain a large block at the end of memory
  • 23. Worst Fit Algorithm: Search entire list. Produces the largest left over hole. Allocate the largest hole.