SlideShare a Scribd company logo
Memory management
Memory management is the functionality of an operating system which handles or manages
primary memory and moves processes back and forth between main memory and disk during
execution.
Memory management keeps track of each and every memory location, regardless of either it is
allocated to some process or it is free. It checks how much memory is to be allocated to processes.
It decides which process will get memory at what time. It tracks whenever some memory gets
freed or unallocated and correspondingly it updates the status.
Address binding
Address binding is the process of mapping the program's logical or virtual addresses to
corresponding physical or main memory addresses. In other words, a given logical address is
mapped by the MMU (Memory Management Unit) to a physical address.
Multistep Processing of a User Program
Classically, the binding of instructions and data to memory addresses can be done at any step along
the way:
 Compile time. If you know at compile time where the process will reside in memory, then
absolute code can be generated.
 Load time. If it is not known at compile time where the process will reside in memory,
then the compiler must generate relocatable code.
 Execution time. If the process can be moved during its execution from one memory
segment to another, then binding must be delayed until run time.
ProcessAddressSpace
The process address space is the set of logical addresses that a process references in its code. For
example, when 32-bit addressing is in use, addresses can range from 0 to 0x7fffffff; that is, 2^31
possible numbers, for a total theoretical size of 2 gigabytes.
There are three types of addresses used in a program before and after memory is allocated −
S.N. Memory Addresses & Description
1 Symbolic addresses
The addresses used in a source code. The variable names, constants, and instruction
labels are the basic elements of the symbolic address space.
2 Relative addresses
At the time of compilation, a compiler converts symbolic addresses into relative
addresses.
3 Physical addresses
The loader generates these addresses at the time when a program is loaded into main
memory.
Logical Versus Physical Address
An address generated by the CPU is commonly refereed as Logical Address, whereas
the address seen by the memory unit that is one loaded into the memory address register of the
memory is commonly refereed as the Physical Address.
Logical Versus Physical Address Space
Virtual and physical addresses are the same in compile-time and load-time address-binding
schemes. Virtual and physical addresses differ in execution-time address-binding scheme.
The set of all logical addresses generated by a program is referred to as a logical address space.
The set of all physical addresses corresponding to these logical addresses is referred to as
a physical address space.
Memory Management Unit
The runtime mapping from virtual to physical address is done by the memory management unit
(MMU) which is a hardware device. MMU uses following mechanism to convert virtual address
to physical address.
 The value in the base register is added to every address generated by a user process, which
is treated as offset at the time it is sent to memory. For example, if the base register value
is 10000, then an attempt by the user to use address location 100 will be dynamically
reallocated to location 10100.
 The user program deals with virtual addresses; it never sees the real physical addresses.

More Related Content

PPTX
Memory management
PDF
Address Binding Scheme
PPTX
DOCX
Operating system
PPT
Memory+management
PDF
Process coordination
PPT
Computer software 2
Memory management
Address Binding Scheme
Operating system
Memory+management
Process coordination
Computer software 2

What's hot (20)

PPT
Mca admissions in india
PPTX
Paging and Segmentation in Operating System
PDF
Operating system 2 by adi
PPT
Chapter 8 - Main Memory
DOC
Bt0070
PPT
PPT
Main memory os - prashant odhavani- 160920107003
PPT
Computer software 2
PPTX
Process creation and termination In Operating System
PPT
process creation OS
DOC
Introduction to Operating System (Important Notes)
PPT
Multiprocessor scheduling 1
PPT
Chapter 2 (Part 2)
PPTX
Cache memory
PPT
Chapter 8 : Memory
PDF
Process management
PPTX
Segmentation in Operating Systems.
PPT
23. Advanced Datatypes and New Application in DBMS
PPT
Computer organization memory hierarchy
PPT
Chapter 2 part 1
Mca admissions in india
Paging and Segmentation in Operating System
Operating system 2 by adi
Chapter 8 - Main Memory
Bt0070
Main memory os - prashant odhavani- 160920107003
Computer software 2
Process creation and termination In Operating System
process creation OS
Introduction to Operating System (Important Notes)
Multiprocessor scheduling 1
Chapter 2 (Part 2)
Cache memory
Chapter 8 : Memory
Process management
Segmentation in Operating Systems.
23. Advanced Datatypes and New Application in DBMS
Computer organization memory hierarchy
Chapter 2 part 1
Ad

Similar to Memory management (20)

PPTX
Operating system 32 logical versus physical address
PDF
Operating system Memory management
PPT
Ios103 ios102 iv-operating-system-memory-management_wk4
PDF
Memory Management Strategies - I.pdf
PPTX
Memory management
PDF
Memory Management(MM) in operating system
PDF
Operating Systems - memory management
PDF
Memory Management slides of operating system
PPTX
Memory Management in System Designing.pptx
PPT
operationg systemsdocumentmemorymanagement
PPT
OS-unit-3 part -1mxmxmxmmxmxmmxmxmxmxmxmmxmxmmx.ppt
PPT
PPTX
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx
PPTX
Operating System_2.1_Memory Management.pptx
PPTX
Memory Managment(OS).pptx
PPTX
Lecture-7 Main Memroy.pptx
DOCX
Main memoryfinal
DOCX
Opetating System Memory management
DOCX
Mainmemoryfinal 161019122029
DOCX
Mainmemoryfinalprefinal 160927115742
Operating system 32 logical versus physical address
Operating system Memory management
Ios103 ios102 iv-operating-system-memory-management_wk4
Memory Management Strategies - I.pdf
Memory management
Memory Management(MM) in operating system
Operating Systems - memory management
Memory Management slides of operating system
Memory Management in System Designing.pptx
operationg systemsdocumentmemorymanagement
OS-unit-3 part -1mxmxmxmmxmxmmxmxmxmxmxmmxmxmmx.ppt
HW29kkkkkkkkkkkkkkkkkkkmmmmkkmmkkk454.pptx
Operating System_2.1_Memory Management.pptx
Memory Managment(OS).pptx
Lecture-7 Main Memroy.pptx
Main memoryfinal
Opetating System Memory management
Mainmemoryfinal 161019122029
Mainmemoryfinalprefinal 160927115742
Ad

More from A. S. M. Shafi (20)

DOCX
Data Warehouse Schema (Star, Snowflake).docx
PDF
Correlation Analysis in Machine Learning.pdf
PDF
Naive Bayes and Decision Tree Algorithm.pdf
PDF
Frequent Pattern Growth Mining Algorithm.pdf
PDF
Direct Hashing and Pruning Algorithm in Data MIning.pdf
PDF
Association Rule Mining with Apriori Algorithm.pdf
PDF
HITS Algorithm in Data and Web MIning.pdf
PDF
Page Rank Algorithm in Data Mining and Web Application.pdf
PDF
K Nearest Neighbor Classifier in Machine Learning.pdf
PDF
K Means Clustering Algorithm in Machine Learning.pdf
PDF
2D Transformation in Computer Graphics
PDF
3D Transformation in Computer Graphics
PDF
Projection
PDF
2D Transformation
PDF
Line drawing algorithm
PDF
Fragmentation
PDF
File organization
PDF
Bankers algorithm
PDF
RR and priority scheduling
PDF
Fcfs and sjf
Data Warehouse Schema (Star, Snowflake).docx
Correlation Analysis in Machine Learning.pdf
Naive Bayes and Decision Tree Algorithm.pdf
Frequent Pattern Growth Mining Algorithm.pdf
Direct Hashing and Pruning Algorithm in Data MIning.pdf
Association Rule Mining with Apriori Algorithm.pdf
HITS Algorithm in Data and Web MIning.pdf
Page Rank Algorithm in Data Mining and Web Application.pdf
K Nearest Neighbor Classifier in Machine Learning.pdf
K Means Clustering Algorithm in Machine Learning.pdf
2D Transformation in Computer Graphics
3D Transformation in Computer Graphics
Projection
2D Transformation
Line drawing algorithm
Fragmentation
File organization
Bankers algorithm
RR and priority scheduling
Fcfs and sjf

Recently uploaded (20)

PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
advance database management system book.pdf
PDF
1_English_Language_Set_2.pdf probationary
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
My India Quiz Book_20210205121199924.pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
Virtual and Augmented Reality in Current Scenario
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
What if we spent less time fighting change, and more time building what’s rig...
AI-driven educational solutions for real-life interventions in the Philippine...
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
advance database management system book.pdf
1_English_Language_Set_2.pdf probationary
TNA_Presentation-1-Final(SAVE)) (1).pptx
Unit 4 Computer Architecture Multicore Processor.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
B.Sc. DS Unit 2 Software Engineering.pptx
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
My India Quiz Book_20210205121199924.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
Indian roads congress 037 - 2012 Flexible pavement
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Hazard Identification & Risk Assessment .pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Virtual and Augmented Reality in Current Scenario
History, Philosophy and sociology of education (1).pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...

Memory management

  • 1. Memory management Memory management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution. Memory management keeps track of each and every memory location, regardless of either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status. Address binding Address binding is the process of mapping the program's logical or virtual addresses to corresponding physical or main memory addresses. In other words, a given logical address is mapped by the MMU (Memory Management Unit) to a physical address. Multistep Processing of a User Program
  • 2. Classically, the binding of instructions and data to memory addresses can be done at any step along the way:  Compile time. If you know at compile time where the process will reside in memory, then absolute code can be generated.  Load time. If it is not known at compile time where the process will reside in memory, then the compiler must generate relocatable code.  Execution time. If the process can be moved during its execution from one memory segment to another, then binding must be delayed until run time. ProcessAddressSpace The process address space is the set of logical addresses that a process references in its code. For example, when 32-bit addressing is in use, addresses can range from 0 to 0x7fffffff; that is, 2^31 possible numbers, for a total theoretical size of 2 gigabytes. There are three types of addresses used in a program before and after memory is allocated − S.N. Memory Addresses & Description 1 Symbolic addresses The addresses used in a source code. The variable names, constants, and instruction labels are the basic elements of the symbolic address space. 2 Relative addresses At the time of compilation, a compiler converts symbolic addresses into relative addresses. 3 Physical addresses The loader generates these addresses at the time when a program is loaded into main memory. Logical Versus Physical Address An address generated by the CPU is commonly refereed as Logical Address, whereas the address seen by the memory unit that is one loaded into the memory address register of the memory is commonly refereed as the Physical Address.
  • 3. Logical Versus Physical Address Space Virtual and physical addresses are the same in compile-time and load-time address-binding schemes. Virtual and physical addresses differ in execution-time address-binding scheme. The set of all logical addresses generated by a program is referred to as a logical address space. The set of all physical addresses corresponding to these logical addresses is referred to as a physical address space. Memory Management Unit The runtime mapping from virtual to physical address is done by the memory management unit (MMU) which is a hardware device. MMU uses following mechanism to convert virtual address to physical address.  The value in the base register is added to every address generated by a user process, which is treated as offset at the time it is sent to memory. For example, if the base register value is 10000, then an attempt by the user to use address location 100 will be dynamically reallocated to location 10100.  The user program deals with virtual addresses; it never sees the real physical addresses.