Instructions Data Stack Heap
Instructions Data Stack Heap
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.
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
Instructions
Data
Stack
Heap
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
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
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
7500 +15=7515
15
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.