Memory Address

Filter Course


Memory Address

Published by: Zaya

Published date: 22 Jun 2021

Memory Address Photo

Memory Address

Logical Address

A logical address is generated by the CPU while a program is running. The logical address is a virtual address as it does not exist physically, therefore, it is also known as a Virtual Address. This address is used as a reference to access the physical memory location by CPU. The term Logical Address Space is used for the set of all logical addresses generated from a program’s perspective.
The hardware device called Memory-Management Unit is used for mapping logical addresses to their corresponding physical address.

Physical Address

Physical Address identifies a physical location of required data in memory. The user never directly deals with the physical address but can access it by its corresponding logical address. The user program generates the logical address and thinks that the program is running in this logical address but the program needs physical memory for its execution, therefore, the logical address must be mapped to the physical address by MMU before they are used. The term Physical Address Space is used for all physical addresses corresponding to the logical addresses in a logical address space.

Logical and Physical Address

Differences Between Logical and Physical Address in Operating System

  1. The basic difference between Logical and physical address is that Logical address is generated by the CPU in the perspective of a program whereas the physical address is a location that exists in the memory unit.
  2. Logical Address Space is the set of all logical addresses generated by CPU for a program whereas the set of all physical addresses mapped to corresponding logical addresses is called Physical Address Space.
  3. The logical address does not exist physically in the memory whereas a physical address is a location in the memory that can be accessed physically.
  4. Identical logical addresses are generated by Compile-time and Load time address binding methods whereas they differ from each other in the run-time address binding method.
  5. The logical address is generated by the CPU while the program is running whereas the physical address is computed by the Memory Management Unit (MMU).

Comparison Chart:

PARAMETER LOGICAL ADDRESS PHYSICAL ADDRESS
Basic generated by CPU location in a memory unit
Address Space Logical Address Space is a set of all logical addresses generated by the CPU in reference to a program. Physical Address is a set of all physical addresses mapped to the corresponding logical addresses.
Visibility Users can view the logical address of a program. Users can never view the physical address of the 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.

Logical memory enables the user to use a large amount of memory to store data. It defines ways to organize the physical memory such as RAM and cache. This enables the Operating System to arrange memory in a logical manner such as assigning a logical address.

Physical memory refers to the actual RAM of the system, which usually takes the form of cards attached onto the motherboard. Also called primary memory, it is the only storage type directly accessibly to the CPU and holds the instructions of programs to execute. Physical memory is linearly addressable; memory addresses increase in a linear fashion and each byte is directly addressable.