Logical and Physical Address in Operating System (original) (raw)

Last Updated : 15 Apr, 2026

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.

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.

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.

**Similarities in Logical and Physical Addresses

cpu

Memory Management

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 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.