Memory access in operating systems happens through two types of addresses: logical (virtual) and physical. The Memory Management Unit (MMU) sits between the CPU and the physical memory. Its job is to translate every logical address into the correct physical address.
- Programs to believe they have a large, continuous memory space
- The OS protects one process’s memory from another process
- Efficient use of RAM through paging, segmentation, or both
Whenever the CPU accesses memory, it sends a logical address → the MMU converts it → the corresponding physical address in RAM is accessed.
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 in Logical and Physical Addresses
- Both logical and physical addresses are used to identify a specific location in memory.
- Each address type can be represented in different formats such as binary, hexadecimal, or decimal.
- They 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.
Key functions of Memory Management Unit
- Logical addresses provide abstraction, so processes don’t need to know physical locations.
- These logical addresses are translated into physical addresses using a page table.
- Translation is transparent and handled by hardware (MMU).
- Enables efficient memory management through paging and segmentation.
Logical Address vs. Physical Address
| Logical Address | Physical Address |
|---|---|
| Generated by the CPU during program execution | Generated by the Memory Management Unit (MMU) |
| 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. |
| User can view and access the logical address of a program. | User can never view physical address of program. |
| Can change during program execution (due to relocation, paging, etc.) | Generally fixed once assigned in memory |
| The user can use the logical address to access the physical address. | The user can indirectly access physical address but not directly. |
| Logical address can be change. | Physical address will not change. |
| Virtual address. | Real address. |