SlideShare a Scribd company logo
5
Most read
6
Most read
8
Most read
Memory allocation (4)
Memory allocation (4)
 Memory    is the processes by which
 information is encoded, stored and
 retrieved. Encoding allow information
 that is from the outside world to reach
 our senses in the forms of chemical
 and physical stimuli.
   An alloation is something that you set
    aside for use .for instance if you want to
    set aside a certain amount of hard drive
    space for an application,you can
    allocate how much in the settings.
   The placement of blocks of information in a
    memory system is called memory
    allocation.
   To allocate memory it is necessary to keep
    in information of available memory in the
    system.If memory management system finds
    sufficient free memory,it allocates only as
    much memory as needed ,keeping the rest
    available to satisfy future request .
   If sufficient memory is not available,
    swapping of blocks is done.
   In static memory allocation, size of the
    memory may be required for the
    calculation that must be define before
    loading and executing the program.
 Two methods are used for dynamic
  memory allocation:
1-Nonpreemptive allocation
2-preemptive allocation
   Consider M1 as a main memory and M2
    as a secondry memory and a block K of
    n words is to be transferred from M2 to
    M1.for such memory allocation it is
    necessary to find or create an available
    reason of n or more words to
    accommodate K.This process is known
    as nonpreemptive allocation.
   In this algorithm, searching is started
    either at the beginning of the memory or
    where the previous first fit search ended.
   In this algorithm, all free memory blocks
    are searched and smallest free memory
    block which is large enough to
    accommodate desired block K is used to
    allocate K.
Memory allocation (4)
   Nonpreemptive allocation can’t make
    efficient use of memory in all situation.
    Due scattered memory blocks larger free
    memory blocks may not be available.
    Much more efficient us of the available
    memory space is possible if the
    occupied space can be re allocated to
    make room for incoming blocks by a
    method called as compaction.
 Fixed memory
 Stack memory
 Heap memory
 Executable code
 Global variables
 Constant structures that don’t fit inside a
  machine instruction. (constant arrays,
  strings, floating points, long integers etc.)
 Static variables.
 Subroutine local variable in non-recursive
  languages (e.g. early FORTRAN).
 Stores information in such a manner that the
  item stored last is the first item retrieved.
 In digital computer, it is essentially a
  memory unit with an address register that
  can count only after an initial value is
  loaded into it.
 Two operations of a stack are
 1. Insertion
 2. Deletion
  Structures whose size varies dynamically
   (e.g. variable length arrays or strings).
 Structures that are allocated
   dynamically (e.g. records in a linked list).
 Structures created by a function call that
   must survive after the call returns.
Issues:
 Allocation and free space management
 Deallocation / garbage collection
Memory allocation (4)

More Related Content

PPT
Thrashing allocation frames.43
PPT
Chapter 8 - Main Memory
PPT
Contiguous Memory Allocation.ppt
PPT
Chapter 6 - Process Synchronization
PPTX
Unit 4-Memory Management - operating systems.pptx
PPTX
Operating system 32 logical versus physical address
PPTX
Fragmentaton
PDF
OS Memory Management
Thrashing allocation frames.43
Chapter 8 - Main Memory
Contiguous Memory Allocation.ppt
Chapter 6 - Process Synchronization
Unit 4-Memory Management - operating systems.pptx
Operating system 32 logical versus physical address
Fragmentaton
OS Memory Management

What's hot (20)

PPTX
Demand paging
PDF
Run time storage
PPT
Deadlock
PPTX
Deadlocks in operating system
PPT
Memory hierarchy
PDF
Array data structure
PPTX
Memory management
PPT
Complexity of Algorithm
PPTX
Process scheduling
PDF
Memory management
PDF
Process scheduling (CPU Scheduling)
PPS
Virtual memory
PPTX
Free Space Management, Efficiency & Performance, Recovery and NFS
PPT
3.8 quick sort
PPT
Time complexity
PPTX
Dead Lock in operating system
PPTX
Deadlock dbms
PDF
sparse matrix in data structure
PPTX
Computer architecture page replacement algorithms
PPTX
Stacks IN DATA STRUCTURES
Demand paging
Run time storage
Deadlock
Deadlocks in operating system
Memory hierarchy
Array data structure
Memory management
Complexity of Algorithm
Process scheduling
Memory management
Process scheduling (CPU Scheduling)
Virtual memory
Free Space Management, Efficiency & Performance, Recovery and NFS
3.8 quick sort
Time complexity
Dead Lock in operating system
Deadlock dbms
sparse matrix in data structure
Computer architecture page replacement algorithms
Stacks IN DATA STRUCTURES
Ad

Similar to Memory allocation (4) (20)

PPTX
Dynamic memory allocation(memory,allocation,memory allocatin,calloc,malloc,re...
PPTX
B.Tech. Computer Science Engineering OS Notes Unit 3
PPT
7. Memory management in operating system.ppt
PPTX
C dynamic ppt
PPTX
4-Memory Management -Main memoryyesno.pptx
PPTX
Memory Management
PPTX
Dynamic storage allocation techniques in Compiler design
PPT
operationg systemsdocumentmemorymanagement
PPT
OS-unit-3 part -1mxmxmxmmxmxmmxmxmxmxmxmmxmxmmx.ppt
PPTX
Dynamic memory allocation
PPTX
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx
PPTX
Lecture 5 memory management in operating systems.pptx
PPTX
Os unit 3
PPTX
Memory Management
PPTX
Memory Management techniques -ch8_1.pptx
PPTX
Memory allocation for real time operating system
PPT
Memory management principles in operating systems
PDF
Operating system 3
PPT
Memory management
PPTX
Memory management Assignment Help
Dynamic memory allocation(memory,allocation,memory allocatin,calloc,malloc,re...
B.Tech. Computer Science Engineering OS Notes Unit 3
7. Memory management in operating system.ppt
C dynamic ppt
4-Memory Management -Main memoryyesno.pptx
Memory Management
Dynamic storage allocation techniques in Compiler design
operationg systemsdocumentmemorymanagement
OS-unit-3 part -1mxmxmxmmxmxmmxmxmxmxmxmmxmxmmx.ppt
Dynamic memory allocation
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx
Lecture 5 memory management in operating systems.pptx
Os unit 3
Memory Management
Memory Management techniques -ch8_1.pptx
Memory allocation for real time operating system
Memory management principles in operating systems
Operating system 3
Memory management
Memory management Assignment Help
Ad

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Tartificialntelligence_presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
1. Introduction to Computer Programming.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Assigned Numbers - 2025 - Bluetooth® Document
Per capita expenditure prediction using model stacking based on satellite ima...
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Programs and apps: productivity, graphics, security and other tools
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
Spectroscopy.pptx food analysis technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Tartificialntelligence_presentation.pptx
Spectral efficient network and resource selection model in 5G networks
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
1. Introduction to Computer Programming.pptx
Electronic commerce courselecture one. Pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Memory allocation (4)

  • 3.  Memory is the processes by which information is encoded, stored and retrieved. Encoding allow information that is from the outside world to reach our senses in the forms of chemical and physical stimuli.
  • 4. An alloation is something that you set aside for use .for instance if you want to set aside a certain amount of hard drive space for an application,you can allocate how much in the settings.
  • 5. The placement of blocks of information in a memory system is called memory allocation.  To allocate memory it is necessary to keep in information of available memory in the system.If memory management system finds sufficient free memory,it allocates only as much memory as needed ,keeping the rest available to satisfy future request .  If sufficient memory is not available, swapping of blocks is done.
  • 6. In static memory allocation, size of the memory may be required for the calculation that must be define before loading and executing the program.
  • 7.  Two methods are used for dynamic memory allocation: 1-Nonpreemptive allocation 2-preemptive allocation
  • 8. Consider M1 as a main memory and M2 as a secondry memory and a block K of n words is to be transferred from M2 to M1.for such memory allocation it is necessary to find or create an available reason of n or more words to accommodate K.This process is known as nonpreemptive allocation.
  • 9. In this algorithm, searching is started either at the beginning of the memory or where the previous first fit search ended.
  • 10. In this algorithm, all free memory blocks are searched and smallest free memory block which is large enough to accommodate desired block K is used to allocate K.
  • 12. Nonpreemptive allocation can’t make efficient use of memory in all situation. Due scattered memory blocks larger free memory blocks may not be available. Much more efficient us of the available memory space is possible if the occupied space can be re allocated to make room for incoming blocks by a method called as compaction.
  • 13.  Fixed memory  Stack memory  Heap memory
  • 14.  Executable code  Global variables  Constant structures that don’t fit inside a machine instruction. (constant arrays, strings, floating points, long integers etc.)  Static variables.  Subroutine local variable in non-recursive languages (e.g. early FORTRAN).
  • 15.  Stores information in such a manner that the item stored last is the first item retrieved.  In digital computer, it is essentially a memory unit with an address register that can count only after an initial value is loaded into it.  Two operations of a stack are 1. Insertion 2. Deletion
  • 16.  Structures whose size varies dynamically (e.g. variable length arrays or strings).  Structures that are allocated dynamically (e.g. records in a linked list).  Structures created by a function call that must survive after the call returns. Issues:  Allocation and free space management  Deallocation / garbage collection