SlideShare a Scribd company logo
Presented By:
SATYA PRAKASH RANJAN
MCA/25005/18
CONTENTS
 What is memory allocation?
 Types of memory allocation
 Use of stack
 Use of heap
 Memory allocation model
4/13/2020 Footer Text 2
Meaning of memory allocation
 Processes are assigned a specific memory as
per their requirements during their run-
time.
 When the program is finished its operation
or is idle, the memory is released and
allocated to another program or merged
within the primary memory.
4/13/2020 Footer Text 3
Types of memory allocation
 Memory allocation has two core types;
 Static Memory Allocation:
 Memory allocated at compile time.
 Dynamic Memory Allocation:
 Memory allocated at run time.
4/13/2020 Footer Text 4
4/13/2020 Footer Text 5
Static vs Dynamic allocation
Memory assignment
 Memory assignment usually follow these 2 type of
Data Structures based on the need and use cases
 Stack Based
 Heap Based
4/13/2020 Footer Text 6
Stack based memory assignment
 Allocated memory includes variables whose scope is
associated with functions, procedures, or blocks, in a
program and parameters of function calls.
 Memory is allocated when a function or block is
entered and is deallocated when it is exited.
 Last-In First-Out (LIFO) nature of the
allocation/deallocation of data leads to Stack based
allocation
4/13/2020 Footer Text 7
 Each entry in stack is of some standard size e.g. N bytes
 A contiguous area of memory is reserved for the stack.
 Only the last entry of the stack is accessible at any time.
 Stack data is used to support function calls during
execution
 The group of stack entries that pertain to one function
call is called a stack frame.
 Stack frame is pushed on the stack during function call
4/13/2020 Footer Text 8
 Two provisions are made to facilitate use of stack
frames:
 The first entry in a stack frame is a pointer to the
previous stack frame on the stack. This entry facilitates
popping off of a stack frame.
 A pointer called the frame base (FB) is used to point
to the start of the topmost stack frame in the
stack.
 It helps in accessing various stack entries in the
stack frame.
4/13/2020 Footer Text 9
Heap based memory assignment
 The program-controlled dynamic data (PCD data) of
the program is allocated by using Heap
 Heap allows allocation/de-allocation of memory in
random order
 An allocation request by a process returns with a
pointer to the allocated memory area in the heap, and
the process accesses the allocated memory area
through this pointer.
 A de-allocation request returns a pointer to the
memory area to be de-allocated.
4/13/2020 Footer Text 10
Memory allocation model for a
process
 The kernel creates a new process when a user issues a
command to execute a program.
 At this time, it also decides how much memory it
should allocate to the process
 Process needs memory for following components:
 Code and static data of the program
 Stack
 Program-controlled dynamic data (PCD data)
4/13/2020 Footer Text 11
4/13/2020 Footer Text 12
Thank You!!!
4/13/2020 Footer Text 13

More Related Content

What's hot

Memory management
Memory managementMemory management
Memory management
Vishal Singh
 
OS Memory Management
OS Memory ManagementOS Memory Management
OS Memory Management
anand hd
 
Memory management
Memory managementMemory management
Memory management
Muhammad Fayyaz
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
Anil Kumar Pugalia
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
Akmal Cikmat
 
Disk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibonDisk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibon
Jayed Hossain Jibon
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
Ali Broumandnia
 
cache memory
 cache memory cache memory
cache memory
NAHID HASAN
 
Unix ch03-03(2)
Unix ch03-03(2)Unix ch03-03(2)
Unix ch03-03(2)
Vijay Chandraker
 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
Bullz Musetsho
 
File system structure
File system structureFile system structure
File system structure
sangrampatil81
 
Memory management
Memory managementMemory management
Memory management
Rajni Sirohi
 
Advanced Computer Architecture chapter 5 problem solutions
Advanced Computer  Architecture  chapter 5 problem solutionsAdvanced Computer  Architecture  chapter 5 problem solutions
Advanced Computer Architecture chapter 5 problem solutions
Joe Christensen
 
Cache mapping
Cache mappingCache mapping
Cache mapping
Bibek Brahma
 
Dynamic storage allocation techniques in Compiler design
Dynamic storage allocation techniques in Compiler designDynamic storage allocation techniques in Compiler design
Dynamic storage allocation techniques in Compiler design
kunjan shah
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
Anwal Mirza
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
Mazin Alwaaly
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
vampugani
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
Kathirvel Ayyaswamy
 

What's hot (20)

Memory management
Memory managementMemory management
Memory management
 
OS Memory Management
OS Memory ManagementOS Memory Management
OS Memory Management
 
Memory management
Memory managementMemory management
Memory management
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
 
Disk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibonDisk storage - SlideShare by jayed hossain jibon
Disk storage - SlideShare by jayed hossain jibon
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
cache memory
 cache memory cache memory
cache memory
 
Unix ch03-03(2)
Unix ch03-03(2)Unix ch03-03(2)
Unix ch03-03(2)
 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
 
File system structure
File system structureFile system structure
File system structure
 
Memory management
Memory managementMemory management
Memory management
 
Advanced Computer Architecture chapter 5 problem solutions
Advanced Computer  Architecture  chapter 5 problem solutionsAdvanced Computer  Architecture  chapter 5 problem solutions
Advanced Computer Architecture chapter 5 problem solutions
 
Cache mapping
Cache mappingCache mapping
Cache mapping
 
Dynamic storage allocation techniques in Compiler design
Dynamic storage allocation techniques in Compiler designDynamic storage allocation techniques in Compiler design
Dynamic storage allocation techniques in Compiler design
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 

Similar to Memory Allocation to a process

CD CLASS NOTES- UNIT-4.docx
CD CLASS NOTES- UNIT-4.docxCD CLASS NOTES- UNIT-4.docx
CD CLASS NOTES- UNIT-4.docx
KANDE ARCHANA
 
lecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memorylecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memory
floraaluoch3
 
shashank_hpca1995_00386533
shashank_hpca1995_00386533shashank_hpca1995_00386533
shashank_hpca1995_00386533
Shashank Nemawarkar
 
Data cache design itanium 2
Data cache design itanium 2Data cache design itanium 2
Data cache design itanium 2
Léia de Sousa
 
Cache memory
Cache memoryCache memory
Cache memory
Eklavya Gupta
 
Memory Allocation & Direct Memory Allocation in C & C++ Language PPT
Memory Allocation & Direct Memory Allocation in C & C++ Language PPTMemory Allocation & Direct Memory Allocation in C & C++ Language PPT
Memory Allocation & Direct Memory Allocation in C & C++ Language PPT
AkhilMishra50
 
Reducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplicationReducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplication
Pvrtechnologies Nellore
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
vampugani
 
Reducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplicationReducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplication
Pvrtechnologies Nellore
 
Module 4 memory management
Module 4 memory managementModule 4 memory management
Module 4 memory management
Sweta Kumari Barnwal
 
Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085
Nilesh Bhaskarrao Bahadure
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
Johan Granados Montero
 
Dynamic memory Allocation in c language
Dynamic memory Allocation in c languageDynamic memory Allocation in c language
Dynamic memory Allocation in c language
kiran Patel
 
Nachos 2
Nachos 2Nachos 2
Nachos 2
Eduardo Triana
 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Management
donny101
 
Run time storage
Run time storageRun time storage
Run time storage
Rasineni Madhan Mohan Naidu
 
Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagement
pradeepelinux
 
Power minimization of systems using Performance Enhancement Guaranteed Caches
Power minimization of systems using Performance Enhancement Guaranteed CachesPower minimization of systems using Performance Enhancement Guaranteed Caches
Power minimization of systems using Performance Enhancement Guaranteed Caches
IJTET Journal
 
Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...
Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...
Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...
inside-BigData.com
 
Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...
Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...
Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...
csandit
 

Similar to Memory Allocation to a process (20)

CD CLASS NOTES- UNIT-4.docx
CD CLASS NOTES- UNIT-4.docxCD CLASS NOTES- UNIT-4.docx
CD CLASS NOTES- UNIT-4.docx
 
lecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memorylecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memory
 
shashank_hpca1995_00386533
shashank_hpca1995_00386533shashank_hpca1995_00386533
shashank_hpca1995_00386533
 
Data cache design itanium 2
Data cache design itanium 2Data cache design itanium 2
Data cache design itanium 2
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory Allocation & Direct Memory Allocation in C & C++ Language PPT
Memory Allocation & Direct Memory Allocation in C & C++ Language PPTMemory Allocation & Direct Memory Allocation in C & C++ Language PPT
Memory Allocation & Direct Memory Allocation in C & C++ Language PPT
 
Reducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplicationReducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplication
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Reducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplicationReducing fragmentation for in line deduplication
Reducing fragmentation for in line deduplication
 
Module 4 memory management
Module 4 memory managementModule 4 memory management
Module 4 memory management
 
Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085Memory interfacing of microprocessor 8085
Memory interfacing of microprocessor 8085
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
 
Dynamic memory Allocation in c language
Dynamic memory Allocation in c languageDynamic memory Allocation in c language
Dynamic memory Allocation in c language
 
Nachos 2
Nachos 2Nachos 2
Nachos 2
 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Management
 
Run time storage
Run time storageRun time storage
Run time storage
 
Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagement
 
Power minimization of systems using Performance Enhancement Guaranteed Caches
Power minimization of systems using Performance Enhancement Guaranteed CachesPower minimization of systems using Performance Enhancement Guaranteed Caches
Power minimization of systems using Performance Enhancement Guaranteed Caches
 
Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...
Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...
Characteristics of Remote Persistent Memory – Performance, Capacity, or Local...
 
Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...
Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...
Design and Implementation of a Cache Hierarchy-Aware Task Scheduling for Para...
 

More from Meghaj Mallick

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
Meghaj Mallick
 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
Meghaj Mallick
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
Meghaj Mallick
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
Meghaj Mallick
 
MACRO ASSEBLER
MACRO ASSEBLERMACRO ASSEBLER
MACRO ASSEBLER
Meghaj Mallick
 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
Meghaj Mallick
 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
Meghaj Mallick
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
Meghaj Mallick
 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
Meghaj Mallick
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
Meghaj Mallick
 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
Meghaj Mallick
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
Meghaj Mallick
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
Meghaj Mallick
 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
Meghaj Mallick
 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
Meghaj Mallick
 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
Meghaj Mallick
 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
Meghaj Mallick
 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
Meghaj Mallick
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
Meghaj Mallick
 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
Meghaj Mallick
 

More from Meghaj Mallick (20)

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
 
MACRO ASSEBLER
MACRO ASSEBLERMACRO ASSEBLER
MACRO ASSEBLER
 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
 
Macro assembler
 Macro assembler Macro assembler
Macro assembler
 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
 

Recently uploaded

Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
kkirkland2
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
OECD Directorate for Financial and Enterprise Affairs
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Rosie Wells
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
1990 Media
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
OECD Directorate for Financial and Enterprise Affairs
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
artemacademy2
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
gharris9
 
Updated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidismUpdated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidism
Faculty of Medicine And Health Sciences
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Dutch Power
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
samililja
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
Frederic Leger
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
SkillCertProExams
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
ToshihiroIto4
 

Recently uploaded (19)

Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...Competition and Regulation in Professions and Occupations – ROBSON – June 202...
Competition and Regulation in Professions and Occupations – ROBSON – June 202...
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsCollapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie Wells
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPointMẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
Mẫu PPT kế hoạch làm việc sáng tạo cho nửa cuối năm PowerPoint
 
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
Suzanne Lagerweij - Influence Without Power - Why Empathy is Your Best Friend...
 
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
Competition and Regulation in Professions and Occupations – OECD – June 2024 ...
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
Carrer goals.pptx and their importance in real life
Carrer goals.pptx  and their importance in real lifeCarrer goals.pptx  and their importance in real life
Carrer goals.pptx and their importance in real life
 
Gregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics PresentationGregory Harris - Cycle 2 - Civics Presentation
Gregory Harris - Cycle 2 - Civics Presentation
 
Updated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidismUpdated diagnosis. Cause and treatment of hypothyroidism
Updated diagnosis. Cause and treatment of hypothyroidism
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
 
XP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to LeadershipXP 2024 presentation: A New Look to Leadership
XP 2024 presentation: A New Look to Leadership
 
2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf2024-05-30_meetup_devops_aix-marseille.pdf
2024-05-30_meetup_devops_aix-marseille.pdf
 
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
Mastering the Concepts Tested in the Databricks Certified Data Engineer Assoc...
 
ASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdfASONAM2023_presection_slide_track-recommendation.pdf
ASONAM2023_presection_slide_track-recommendation.pdf
 

Memory Allocation to a process

  • 1. Presented By: SATYA PRAKASH RANJAN MCA/25005/18
  • 2. CONTENTS  What is memory allocation?  Types of memory allocation  Use of stack  Use of heap  Memory allocation model 4/13/2020 Footer Text 2
  • 3. Meaning of memory allocation  Processes are assigned a specific memory as per their requirements during their run- time.  When the program is finished its operation or is idle, the memory is released and allocated to another program or merged within the primary memory. 4/13/2020 Footer Text 3
  • 4. Types of memory allocation  Memory allocation has two core types;  Static Memory Allocation:  Memory allocated at compile time.  Dynamic Memory Allocation:  Memory allocated at run time. 4/13/2020 Footer Text 4
  • 5. 4/13/2020 Footer Text 5 Static vs Dynamic allocation
  • 6. Memory assignment  Memory assignment usually follow these 2 type of Data Structures based on the need and use cases  Stack Based  Heap Based 4/13/2020 Footer Text 6
  • 7. Stack based memory assignment  Allocated memory includes variables whose scope is associated with functions, procedures, or blocks, in a program and parameters of function calls.  Memory is allocated when a function or block is entered and is deallocated when it is exited.  Last-In First-Out (LIFO) nature of the allocation/deallocation of data leads to Stack based allocation 4/13/2020 Footer Text 7
  • 8.  Each entry in stack is of some standard size e.g. N bytes  A contiguous area of memory is reserved for the stack.  Only the last entry of the stack is accessible at any time.  Stack data is used to support function calls during execution  The group of stack entries that pertain to one function call is called a stack frame.  Stack frame is pushed on the stack during function call 4/13/2020 Footer Text 8
  • 9.  Two provisions are made to facilitate use of stack frames:  The first entry in a stack frame is a pointer to the previous stack frame on the stack. This entry facilitates popping off of a stack frame.  A pointer called the frame base (FB) is used to point to the start of the topmost stack frame in the stack.  It helps in accessing various stack entries in the stack frame. 4/13/2020 Footer Text 9
  • 10. Heap based memory assignment  The program-controlled dynamic data (PCD data) of the program is allocated by using Heap  Heap allows allocation/de-allocation of memory in random order  An allocation request by a process returns with a pointer to the allocated memory area in the heap, and the process accesses the allocated memory area through this pointer.  A de-allocation request returns a pointer to the memory area to be de-allocated. 4/13/2020 Footer Text 10
  • 11. Memory allocation model for a process  The kernel creates a new process when a user issues a command to execute a program.  At this time, it also decides how much memory it should allocate to the process  Process needs memory for following components:  Code and static data of the program  Stack  Program-controlled dynamic data (PCD data) 4/13/2020 Footer Text 11