Logical and Physical Address in Operating System
Last Updated :
05 Sep, 2025
In operating systems, memory is accessed using logical (virtual) addresses and physical addresses, which the Memory Management Unit (MMU) maps to manage memory efficiently.
Logical Address
A logical address is generated by the CPU while a program runs. It represents the address from the process’s perspective and does not exist physically, hence it is also called a virtual address.
The logical address space is the set of all logical addresses a process can generate. Programs use logical addresses to reference memory, and the MMU translates them into physical addresses when accessing actual memory.
Physical Address
A physical address is the real location in main memory (RAM) where data or instructions are stored. The physical address space consists of all physical addresses corresponding to logical addresses.
The MMU performs address translation using a page table, mapping each logical page to a physical frame. This allows processes to access memory transparently, without knowing actual memory locations.
Similarities Between Logical and Physical Addresses in the Operating System
- Both logical and physical addresses are used to identify a specific location in memory.
- Both logical and physical addresses can be represented in different formats, such as binary, hexadecimal, or decimal.
- Both logical and physical addresses have a finite range, which is determined by the number of bits used to represent them.
Memory Management Unit
The Memory Management Unit (MMU) is a hardware component in the computer system that handles all memory and caching operations associated with the CPU. Its main function is to translate logical (virtual) addresses generated by the CPU into physical addresses in main memory.
Important Points about Logical and Physical Addresses in Operating Systems
- Logical addresses provide abstraction, so processes don’t need to know physical locations.
- Logical addresses are mapped to physical addresses via the page table.
- Translation is transparent and handled by hardware (MMU).
- Enables efficient memory management through paging and segmentation.
Memory Management Difference Between Logical address and Physical Address
| Parameter | LOGICAL ADDRESS | PHYSICAL ADDRESS |
|---|
| Basic | generated by CPU | location in a memory unit |
| Address Space | Logical Address Space is set of all logical addresses generated by CPU in reference to a program. | Physical Address is set of all physical addresses mapped to the corresponding logical addresses. |
| Visibility | User can view the logical address of a program. | User can never view physical address of program. |
| Generation | generated by the CPU | Computed by MMU |
| Access | The user can use the logical address to access the physical address. | The user can indirectly access physical address but not directly. |
| Editable | Logical address can be change. | Physical address will not change. |
| Also called | virtual address. | real address. |
67. Memory Management | Physical Address and Logical Address Space in Operating System
Visit Course
Explore
OS Basics
Process Management
Memory Management
I/O Management
Important Links