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?

Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architectureArpan Baishya
 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryAnuj Modi
 
Unit IV Memory and I/O Organization
Unit IV Memory and I/O OrganizationUnit IV Memory and I/O Organization
Unit IV Memory and I/O OrganizationBalaji Vignesh
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycleutsav_shah
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor schedulingShashank Kapoor
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsWayne Jones Jnr
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture Haris456
 
Architecture of 80286 microprocessor
Architecture of 80286 microprocessorArchitecture of 80286 microprocessor
Architecture of 80286 microprocessorSyed Ahmed Zaki
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
Input output organization
Input output organizationInput output organization
Input output organizationabdulugc
 

Was ist angesagt? (20)

Dma
DmaDma
Dma
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Unit IV Memory and I/O Organization
Unit IV Memory and I/O OrganizationUnit IV Memory and I/O Organization
Unit IV Memory and I/O Organization
 
Cache memory
Cache memoryCache memory
Cache memory
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
VLIW Processors
VLIW ProcessorsVLIW Processors
VLIW Processors
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage Systems
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
 
Cache memory
Cache memoryCache memory
Cache memory
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
Interrupt
InterruptInterrupt
Interrupt
 
Architecture of 80286 microprocessor
Architecture of 80286 microprocessorArchitecture of 80286 microprocessor
Architecture of 80286 microprocessor
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 

Andere mochten auch

Andere mochten auch (16)

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
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
 
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
 
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
 
Memory management
Memory managementMemory management
Memory management
 

Ähnlich wie Memory management

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 management
Memory managementMemory management
Memory managementPATELARCH
 
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
 

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

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 

Kürzlich hochgeladen (20)

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 

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.