Open In App

Logical and Physical Address in Operating System

Last Updated : 05 Sep, 2025
Comments
Improve
Suggest changes
236 Likes
Like
Report

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.
cpu
Memory Management

Difference Between Logical address and Physical Address

ParameterLOGICAL ADDRESSPHYSICAL ADDRESS
Basicgenerated by CPUlocation in a memory unit
Address SpaceLogical 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.
VisibilityUser can view the logical address of a program.User can never view physical address of program.
Generationgenerated by the CPUComputed by MMU
AccessThe user can use the logical address to access the physical address.The user can indirectly access physical address but not directly.
EditableLogical address can be change.Physical address will not change.
Also calledvirtual address.real address.

67. Memory Management | Physical Address and Logical Address Space in Operating System
Visit Course explore course icon

Explore