SlideShare a Scribd company logo
Shashwat Shriparv
dwivedishashwat@gmail.com
InfinitySoft
The techniques needed to implement dynamic
storage allocation techniques depends on how
the space is deallocated.
ie, implicitly or explicitly
 Explicit allocation of fixed size block
 Explicit allocation of variable size block
 Implicit deallocation
 The simplest form dynamic storage allocation.
 The blocks linked together in a list and the
allocation and deallocation can done quickly
with less or no storage overhead
 A pointer available points to the first block in
the list of available blocks
 available
available
 When blocks are allocated & deallocated
storage can become fragmented ie, heap may
consist alternate blocks that are free & in use
 In variable size allocation it will be a problem
bcoz we could not allocate a block larger than
any free blocks, even though the space is
available
 The first fit method can be used to allocate
variable sized block
 When a block of size is allocated it search for
the first free block size f>=s. This block is then
subdivided in to a used block of size s& a free
block of size f-s. Its time consuming;
 When a block is deallocated ,it check to see if it
is next to a free block .If possible,the
deallocated is combined with a free block next
to it to create larger free block.It helps to avoid
fragmentation.
free free free
 Implicit deallocation requires the cooperation
between user program& runtime packages.this
is implemented by fixing the format of storage
blocks. Optional block size
Optional reference count
Optional mark
Pointers to blocks
User information
 The first problem is to recognize the block
boundaries,for fixed size it is easy.
 In variable size block the size of block is kept in
a inaccessible storage attached to the block.
 The second problem is of recognizing the if a
block is in use. Used block can be referred by
the user program using pointers. The pointers
are kept in a fixed position in the block for the
easiness of checking the reference .
Two approaches can be used for implicit
deallocation.
 Reference counts
 Marking techniques
 We keep track of the no of reference to the
present block. if it ever drops to 0 the block is
deallocated.
 Maintaining reference counts can be costly in
time(the pointer assignment p:=q leads to
changes in the reference counts of the blocks
pointed by both p&q)
 Reference counts are best if there is no cyclical
reference occurs.
 Here the user program suspend temporarily &
use the frozen pointers to determine the used
blocks This approach requires all the pointers
to the heap to be known.(conceptually,it’s like
pouring paint to the heap through the pointers)
 First we go through the heap&marks all the
blocks unused.Then we follow the pointers
&mark all the reachable blocks as used.Then
sequential scan of heap collects all the blocks
still marked unused.
Shashwat Shriparv
dwivedishashwat@gmail.com
InfinitySoft
Ad

More Related Content

What's hot (20)

Memory management
Memory managementMemory management
Memory management
Rajni Sirohi
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
Raj Mohan
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
Meghaj Mallick
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
Shashank Kapoor
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
Meghaj Mallick
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
Muhammad Haroon
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code Generator
Darshan sai Reddy
 
Distributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data ControlDistributed DBMS - Unit 5 - Semantic Data Control
Distributed DBMS - Unit 5 - Semantic Data Control
Gyanmanjari Institute Of Technology
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
Sweetestangel Kochar
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
Meghaj Mallick
 
Memory management
Memory managementMemory management
Memory management
Vishal Singh
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
Kuppusamy P
 
Intruders
IntrudersIntruders
Intruders
Dr.Florence Dayana
 
Operating system paging and segmentation
Operating system paging and segmentationOperating system paging and segmentation
Operating system paging and segmentation
hamza haseeb
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
Dattatray Gandhmal
 
Distributed database
Distributed databaseDistributed database
Distributed database
ReachLocal Services India
 
Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbian
saad symbian
 
Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design
LogsAk
 
Graph coloring using backtracking
Graph coloring using backtrackingGraph coloring using backtracking
Graph coloring using backtracking
shashidharPapishetty
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
Raj Mohan
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
Meghaj Mallick
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
Shashank Kapoor
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
Meghaj Mallick
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
Muhammad Haroon
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code Generator
Darshan sai Reddy
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
Meghaj Mallick
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
Kuppusamy P
 
Operating system paging and segmentation
Operating system paging and segmentationOperating system paging and segmentation
Operating system paging and segmentation
hamza haseeb
 
Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbian
saad symbian
 
Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design Principal Sources of Optimization in compiler design
Principal Sources of Optimization in compiler design
LogsAk
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 

Similar to Dynamic storage allocation techniques (20)

Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
ajeela mushtaq
 
Os7
Os7Os7
Os7
issbp
 
Cb pattern trees identifying
Cb pattern trees  identifyingCb pattern trees  identifying
Cb pattern trees identifying
IJDKP
 
File Allocation methods in Operating Systems
File Allocation methods in Operating SystemsFile Allocation methods in Operating Systems
File Allocation methods in Operating Systems
jdatta247
 
Data discretization
Data discretizationData discretization
Data discretization
Hadi M.Abachi
 
The Uniform Access Principle
The Uniform Access PrincipleThe Uniform Access Principle
The Uniform Access Principle
Philip Schwarz
 
Heap Memory Management.pptx
Heap Memory Management.pptxHeap Memory Management.pptx
Heap Memory Management.pptx
Viji B
 
Mca2020 advanced data structure
Mca2020  advanced data structureMca2020  advanced data structure
Mca2020 advanced data structure
smumbahelp
 
Unit 5 Quantization
Unit 5 QuantizationUnit 5 Quantization
Unit 5 Quantization
Dr Piyush Charan
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
blaksteijn
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
fkngewers
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
nanteguepi
 
new approach of inter cross an efficient multilevel cache management policy
 new approach of inter cross  an efficient multilevel cache management policy new approach of inter cross  an efficient multilevel cache management policy
new approach of inter cross an efficient multilevel cache management policy
INFOGAIN PUBLICATION
 
Pawan111
Pawan111Pawan111
Pawan111
ranjeetdon
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
licebicioc
 
Elements of cache design
Elements of cache designElements of cache design
Elements of cache design
Rohail Butt
 
PgVector + : Enable Richer Interaction with vector database.pptx
PgVector + : Enable Richer Interaction with vector database.pptxPgVector + : Enable Richer Interaction with vector database.pptx
PgVector + : Enable Richer Interaction with vector database.pptx
aranjan11
 
635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...
635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...
635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...
shrukandukuri
 
Memory Management
Memory ManagementMemory Management
Memory Management
Visakh V
 
9.1-CSE3421-multicolumn-cache.pdf
9.1-CSE3421-multicolumn-cache.pdf9.1-CSE3421-multicolumn-cache.pdf
9.1-CSE3421-multicolumn-cache.pdf
rishav957243
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
ajeela mushtaq
 
Cb pattern trees identifying
Cb pattern trees  identifyingCb pattern trees  identifying
Cb pattern trees identifying
IJDKP
 
File Allocation methods in Operating Systems
File Allocation methods in Operating SystemsFile Allocation methods in Operating Systems
File Allocation methods in Operating Systems
jdatta247
 
The Uniform Access Principle
The Uniform Access PrincipleThe Uniform Access Principle
The Uniform Access Principle
Philip Schwarz
 
Heap Memory Management.pptx
Heap Memory Management.pptxHeap Memory Management.pptx
Heap Memory Management.pptx
Viji B
 
Mca2020 advanced data structure
Mca2020  advanced data structureMca2020  advanced data structure
Mca2020 advanced data structure
smumbahelp
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
blaksteijn
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
fkngewers
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
nanteguepi
 
new approach of inter cross an efficient multilevel cache management policy
 new approach of inter cross  an efficient multilevel cache management policy new approach of inter cross  an efficient multilevel cache management policy
new approach of inter cross an efficient multilevel cache management policy
INFOGAIN PUBLICATION
 
Absolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions ManualAbsolute C++ 5th Edition Savitch Solutions Manual
Absolute C++ 5th Edition Savitch Solutions Manual
licebicioc
 
Elements of cache design
Elements of cache designElements of cache design
Elements of cache design
Rohail Butt
 
PgVector + : Enable Richer Interaction with vector database.pptx
PgVector + : Enable Richer Interaction with vector database.pptxPgVector + : Enable Richer Interaction with vector database.pptx
PgVector + : Enable Richer Interaction with vector database.pptx
aranjan11
 
635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...
635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...
635109361-34-Cache-memory-Block-Identification-in-Direct-Mapping-Associate-Ma...
shrukandukuri
 
Memory Management
Memory ManagementMemory Management
Memory Management
Visakh V
 
9.1-CSE3421-multicolumn-cache.pdf
9.1-CSE3421-multicolumn-cache.pdf9.1-CSE3421-multicolumn-cache.pdf
9.1-CSE3421-multicolumn-cache.pdf
rishav957243
 
Ad

More from Shashwat Shriparv (20)

Learning Linux Series Administrator Commands.pptx
Learning Linux Series Administrator Commands.pptxLearning Linux Series Administrator Commands.pptx
Learning Linux Series Administrator Commands.pptx
Shashwat Shriparv
 
LibreOffice 7.3.pptx
LibreOffice 7.3.pptxLibreOffice 7.3.pptx
LibreOffice 7.3.pptx
Shashwat Shriparv
 
Kerberos Architecture.pptx
Kerberos Architecture.pptxKerberos Architecture.pptx
Kerberos Architecture.pptx
Shashwat Shriparv
 
Suspending a Process in Linux.pptx
Suspending a Process in Linux.pptxSuspending a Process in Linux.pptx
Suspending a Process in Linux.pptx
Shashwat Shriparv
 
Kerberos Architecture.pptx
Kerberos Architecture.pptxKerberos Architecture.pptx
Kerberos Architecture.pptx
Shashwat Shriparv
 
Command Seperators.pptx
Command Seperators.pptxCommand Seperators.pptx
Command Seperators.pptx
Shashwat Shriparv
 
Upgrading hadoop
Upgrading hadoopUpgrading hadoop
Upgrading hadoop
Shashwat Shriparv
 
Hadoop migration and upgradation
Hadoop migration and upgradationHadoop migration and upgradation
Hadoop migration and upgradation
Shashwat Shriparv
 
R language introduction
R language introductionR language introduction
R language introduction
Shashwat Shriparv
 
Hive query optimization infinity
Hive query optimization infinityHive query optimization infinity
Hive query optimization infinity
Shashwat Shriparv
 
H base introduction & development
H base introduction & developmentH base introduction & development
H base introduction & development
Shashwat Shriparv
 
Hbase interact with shell
Hbase interact with shellHbase interact with shell
Hbase interact with shell
Shashwat Shriparv
 
H base development
H base developmentH base development
H base development
Shashwat Shriparv
 
Hbase
HbaseHbase
Hbase
Shashwat Shriparv
 
H base
H baseH base
H base
Shashwat Shriparv
 
My sql
My sqlMy sql
My sql
Shashwat Shriparv
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
Shashwat Shriparv
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
Shashwat Shriparv
 
Introduction to apache hadoop
Introduction to apache hadoopIntroduction to apache hadoop
Introduction to apache hadoop
Shashwat Shriparv
 
Next generation technology
Next generation technologyNext generation technology
Next generation technology
Shashwat Shriparv
 
Ad

Recently uploaded (20)

Freeze-Dried Fruit Powder Market Trends & Growth
Freeze-Dried Fruit Powder Market Trends & GrowthFreeze-Dried Fruit Powder Market Trends & Growth
Freeze-Dried Fruit Powder Market Trends & Growth
chanderdeepseoexpert
 
Accounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdf
Accounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdfAccounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdf
Accounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdf
CA Suvidha Chaplot
 
The Peter Cowley Entrepreneurship Event Master 30th.pdf
The Peter Cowley Entrepreneurship Event Master 30th.pdfThe Peter Cowley Entrepreneurship Event Master 30th.pdf
The Peter Cowley Entrepreneurship Event Master 30th.pdf
Richard Lucas
 
EquariusAI analytics for business water risk
EquariusAI analytics for business water riskEquariusAI analytics for business water risk
EquariusAI analytics for business water risk
Peter Adriaens
 
CGG Deck English - Apr 2025-edit (1).pptx
CGG Deck English - Apr 2025-edit (1).pptxCGG Deck English - Apr 2025-edit (1).pptx
CGG Deck English - Apr 2025-edit (1).pptx
China_Gold_International_Resources
 
Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...
Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...
Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...
Lviv Startup Club
 
Alan Stalcup - The Enterprising CEO
Alan  Stalcup  -  The  Enterprising  CEOAlan  Stalcup  -  The  Enterprising  CEO
Alan Stalcup - The Enterprising CEO
Alan Stalcup
 
Top 5 Mistakes to Avoid When Writing a Job Application
Top 5 Mistakes to Avoid When Writing a Job ApplicationTop 5 Mistakes to Avoid When Writing a Job Application
Top 5 Mistakes to Avoid When Writing a Job Application
Red Tape Busters
 
Strategic Enterprise Management - Unit I.pptx
Strategic Enterprise Management - Unit I.pptxStrategic Enterprise Management - Unit I.pptx
Strategic Enterprise Management - Unit I.pptx
PrekshyaRana
 
Avoiding the China Tariffs: Save Costs & Stay Competitive
Avoiding the China Tariffs: Save Costs & Stay CompetitiveAvoiding the China Tariffs: Save Costs & Stay Competitive
Avoiding the China Tariffs: Save Costs & Stay Competitive
NovaLink
 
Brandon Flatley - A Skilled Musician
Brandon Flatley - A Skilled MusicianBrandon Flatley - A Skilled Musician
Brandon Flatley - A Skilled Musician
Brandon Flatley
 
Kiran Flemish - A Dynamic Musician
Kiran  Flemish  -  A   Dynamic  MusicianKiran  Flemish  -  A   Dynamic  Musician
Kiran Flemish - A Dynamic Musician
Kiran Flemish
 
Region Research (Hiring Trends) Vietnam 2025.pdf
Region Research (Hiring Trends) Vietnam 2025.pdfRegion Research (Hiring Trends) Vietnam 2025.pdf
Region Research (Hiring Trends) Vietnam 2025.pdf
Consultonmic
 
TMG - Q3 2025 Earnings Call Slides - v4.pptx
TMG - Q3 2025 Earnings Call Slides - v4.pptxTMG - Q3 2025 Earnings Call Slides - v4.pptx
TMG - Q3 2025 Earnings Call Slides - v4.pptx
Marketing847413
 
Cloud Stream Part II Mobile Hub V1 Hub Agency.pdf
Cloud Stream Part II Mobile Hub V1 Hub Agency.pdfCloud Stream Part II Mobile Hub V1 Hub Agency.pdf
Cloud Stream Part II Mobile Hub V1 Hub Agency.pdf
Brij Consulting, LLC
 
NewBase 05 May 2025 Energy News issue - 1785 by Khaled Al Awadi_compressed.pdf
NewBase 05 May 2025  Energy News issue - 1785 by Khaled Al Awadi_compressed.pdfNewBase 05 May 2025  Energy News issue - 1785 by Khaled Al Awadi_compressed.pdf
NewBase 05 May 2025 Energy News issue - 1785 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
Level Up Your Launch: Utilizing AI for Start-up Success
Level Up Your Launch: Utilizing AI for Start-up SuccessLevel Up Your Launch: Utilizing AI for Start-up Success
Level Up Your Launch: Utilizing AI for Start-up Success
Best Virtual Specialist
 
Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...
Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...
Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...
TheoRuby
 
2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf
2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf
2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf
ThiNgc22
 
BeMetals_Presentation_May_2025 .pdf
BeMetals_Presentation_May_2025      .pdfBeMetals_Presentation_May_2025      .pdf
BeMetals_Presentation_May_2025 .pdf
DerekIwanaka2
 
Freeze-Dried Fruit Powder Market Trends & Growth
Freeze-Dried Fruit Powder Market Trends & GrowthFreeze-Dried Fruit Powder Market Trends & Growth
Freeze-Dried Fruit Powder Market Trends & Growth
chanderdeepseoexpert
 
Accounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdf
Accounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdfAccounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdf
Accounting_Basics_Complete_Guide_By_CA_Suvidha_Chaplot (1).pdf
CA Suvidha Chaplot
 
The Peter Cowley Entrepreneurship Event Master 30th.pdf
The Peter Cowley Entrepreneurship Event Master 30th.pdfThe Peter Cowley Entrepreneurship Event Master 30th.pdf
The Peter Cowley Entrepreneurship Event Master 30th.pdf
Richard Lucas
 
EquariusAI analytics for business water risk
EquariusAI analytics for business water riskEquariusAI analytics for business water risk
EquariusAI analytics for business water risk
Peter Adriaens
 
Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...
Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...
Yuriy Chapran: Zero Trust and Beyond: OpenVPN’s Role in Next-Gen Network Secu...
Lviv Startup Club
 
Alan Stalcup - The Enterprising CEO
Alan  Stalcup  -  The  Enterprising  CEOAlan  Stalcup  -  The  Enterprising  CEO
Alan Stalcup - The Enterprising CEO
Alan Stalcup
 
Top 5 Mistakes to Avoid When Writing a Job Application
Top 5 Mistakes to Avoid When Writing a Job ApplicationTop 5 Mistakes to Avoid When Writing a Job Application
Top 5 Mistakes to Avoid When Writing a Job Application
Red Tape Busters
 
Strategic Enterprise Management - Unit I.pptx
Strategic Enterprise Management - Unit I.pptxStrategic Enterprise Management - Unit I.pptx
Strategic Enterprise Management - Unit I.pptx
PrekshyaRana
 
Avoiding the China Tariffs: Save Costs & Stay Competitive
Avoiding the China Tariffs: Save Costs & Stay CompetitiveAvoiding the China Tariffs: Save Costs & Stay Competitive
Avoiding the China Tariffs: Save Costs & Stay Competitive
NovaLink
 
Brandon Flatley - A Skilled Musician
Brandon Flatley - A Skilled MusicianBrandon Flatley - A Skilled Musician
Brandon Flatley - A Skilled Musician
Brandon Flatley
 
Kiran Flemish - A Dynamic Musician
Kiran  Flemish  -  A   Dynamic  MusicianKiran  Flemish  -  A   Dynamic  Musician
Kiran Flemish - A Dynamic Musician
Kiran Flemish
 
Region Research (Hiring Trends) Vietnam 2025.pdf
Region Research (Hiring Trends) Vietnam 2025.pdfRegion Research (Hiring Trends) Vietnam 2025.pdf
Region Research (Hiring Trends) Vietnam 2025.pdf
Consultonmic
 
TMG - Q3 2025 Earnings Call Slides - v4.pptx
TMG - Q3 2025 Earnings Call Slides - v4.pptxTMG - Q3 2025 Earnings Call Slides - v4.pptx
TMG - Q3 2025 Earnings Call Slides - v4.pptx
Marketing847413
 
Cloud Stream Part II Mobile Hub V1 Hub Agency.pdf
Cloud Stream Part II Mobile Hub V1 Hub Agency.pdfCloud Stream Part II Mobile Hub V1 Hub Agency.pdf
Cloud Stream Part II Mobile Hub V1 Hub Agency.pdf
Brij Consulting, LLC
 
NewBase 05 May 2025 Energy News issue - 1785 by Khaled Al Awadi_compressed.pdf
NewBase 05 May 2025  Energy News issue - 1785 by Khaled Al Awadi_compressed.pdfNewBase 05 May 2025  Energy News issue - 1785 by Khaled Al Awadi_compressed.pdf
NewBase 05 May 2025 Energy News issue - 1785 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
Level Up Your Launch: Utilizing AI for Start-up Success
Level Up Your Launch: Utilizing AI for Start-up SuccessLevel Up Your Launch: Utilizing AI for Start-up Success
Level Up Your Launch: Utilizing AI for Start-up Success
Best Virtual Specialist
 
Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...
Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...
Web Design Creating User-Friendly and Visually Engaging Websites - April 2025...
TheoRuby
 
2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf
2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf
2_English_Vocabulary_In_Use_Pre-Intermediate_Cambridge_-_Fourth_Edition (1).pdf
ThiNgc22
 
BeMetals_Presentation_May_2025 .pdf
BeMetals_Presentation_May_2025      .pdfBeMetals_Presentation_May_2025      .pdf
BeMetals_Presentation_May_2025 .pdf
DerekIwanaka2
 

Dynamic storage allocation techniques

  • 2. The techniques needed to implement dynamic storage allocation techniques depends on how the space is deallocated. ie, implicitly or explicitly
  • 3.  Explicit allocation of fixed size block  Explicit allocation of variable size block  Implicit deallocation
  • 4.  The simplest form dynamic storage allocation.  The blocks linked together in a list and the allocation and deallocation can done quickly with less or no storage overhead  A pointer available points to the first block in the list of available blocks
  • 6.  When blocks are allocated & deallocated storage can become fragmented ie, heap may consist alternate blocks that are free & in use  In variable size allocation it will be a problem bcoz we could not allocate a block larger than any free blocks, even though the space is available  The first fit method can be used to allocate variable sized block
  • 7.  When a block of size is allocated it search for the first free block size f>=s. This block is then subdivided in to a used block of size s& a free block of size f-s. Its time consuming;  When a block is deallocated ,it check to see if it is next to a free block .If possible,the deallocated is combined with a free block next to it to create larger free block.It helps to avoid fragmentation.
  • 9.  Implicit deallocation requires the cooperation between user program& runtime packages.this is implemented by fixing the format of storage blocks. Optional block size Optional reference count Optional mark Pointers to blocks User information
  • 10.  The first problem is to recognize the block boundaries,for fixed size it is easy.  In variable size block the size of block is kept in a inaccessible storage attached to the block.  The second problem is of recognizing the if a block is in use. Used block can be referred by the user program using pointers. The pointers are kept in a fixed position in the block for the easiness of checking the reference .
  • 11. Two approaches can be used for implicit deallocation.  Reference counts  Marking techniques
  • 12.  We keep track of the no of reference to the present block. if it ever drops to 0 the block is deallocated.  Maintaining reference counts can be costly in time(the pointer assignment p:=q leads to changes in the reference counts of the blocks pointed by both p&q)  Reference counts are best if there is no cyclical reference occurs.
  • 13.  Here the user program suspend temporarily & use the frozen pointers to determine the used blocks This approach requires all the pointers to the heap to be known.(conceptually,it’s like pouring paint to the heap through the pointers)  First we go through the heap&marks all the blocks unused.Then we follow the pointers &mark all the reachable blocks as used.Then sequential scan of heap collects all the blocks still marked unused.