0% found this document useful (0 votes)
27 views3 pages

Instructions Data Stack Heap

The document discusses memory management in an operating system. It describes how the OS allocates and deallocates memory and organizes it with physical and logical addresses. It also discusses different memory storage units like cache, registers, and main memory and how they are used. Memory management involves address binding, loading programs into memory, and allocating memory addresses. The OS uses a memory management unit to map virtual to physical addresses.

Uploaded by

Piyush Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Instructions Data Stack Heap

The document discusses memory management in an operating system. It describes how the OS allocates and deallocates memory and organizes it with physical and logical addresses. It also discusses different memory storage units like cache, registers, and main memory and how they are used. Memory management involves address binding, loading programs into memory, and allocating memory addresses. The OS uses a memory management unit to map virtual to physical addresses.

Uploaded by

Piyush Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

MEMORY MANAGEMENT

An OS keeps track of all storage devices and manages appropriately for their proper utilisation.It
allocates and dellocates memory ,based on its usage (free or used).

Memory is organised as set of bytes or words each having their unique address phsically as well as
logically.

Main Cache Registers CPU


Memory

clock speed increases

memory size increases

Cache memory generally stores most frequently needed data/process ,to prevent delay of
transmission of data due diffrence in their clock speed.

Registers high speed data storage unit residing in CPU for storing input ,intermediate and resultant
values ,these mostly store memory address of required data within one clock cycle.

Address Binding

It is the process of mapping memory address from one address space to other

Input Queue -> Symbolic Address -> Relocatable/Relative Address -> Physical Address

Loader/Linker program links relative address to their absolute address.

Program Address Space

Instructions

Data

Stack

Heap

Allocation of Memory Address

Symbolic Address The address defined in source program i.e variables & constants name or
instruction labels.

Relative/Relocatable Address The address generated at time of compilation i.e when source code
is converted to object code.
Physical Address The loader generates these absolute address at time of execution when program
is loaded into main memory

Types of Address Space

1. Logical Address Space The set of all logical address used by program ,assigned by CPU
2. Physical Address Space The set of physical address loaded into memory registers i.e seen
in memory

Types of Address Binding

1. Compile Time Binding - When location of progam needs to be known at compile time.
It needs recompilation if relocated to other place.
Compiler binds names to actual physical addresses(absolute code).
2. Load Time Binding When location is not known ,compiler produces a relocatable code.
It dosent supports relocation during execution.
Compiler binds name to their relative address(object code).
3. Run Time Binding When location is relocated during execution ,CPU generates relative
addresses bound to their absolute addresses at runtime.
Special Hardware support is needed.

Memory Mangement Unit It maps virtual addresses to its physical addresses during run-time.

CPU Memory

MMU

BUS

Relocation Register - It is used to stores base address(OFFSET-intial address of block) , which is


added to logical address to generate its physical address called Memory Mapping.

BASE + LOGICAL = PHYSICAL

7500 +15=7515

15

CPU 7500 + 7515 Memory

MMU
Types of Loading

1. Static Loading(Load Time Binding) When linker binds object program directly with object
modules(libraries),with their logical addresses.
all routines are loaded into memory at execution time.
2. Dynamic Loading(Runtime Binding) When linker bind object program with reference of
object modules.
only needed routines are loaded dynamically into memory at execution time.

Memory Allocation Mechanisms

1. Single Partition It stores all process into a single memory block


Relocation register is used to store base address ,to protect various user processes.
Limit register is used to store range of logical addresses.
2. Multiple Partiton It divides block into fixed sized partitions consisting of only one process
at a time in a partition

Kernel Space Kernel Space

User Space User Space

Single Partiton Multiple Partiton

You might also like