Difference between Physical Address and Logical Address

An address space can be defined as a memory area that is addressable and can be allocated to store data or instructions and used to uniquely identify the particular area available for processes.

logical address vs physical address

There are two types of addresses, logical and physical address. Whenever a program or process is executed, a logical address is produced by CPU and used as a reference to locate physical addresses in memory unit.

Difference between Logical address and Physical address space

BasisLogical AddressPhysical Address
DefinitionAn address of an instruction that is accessed during program or process executionAn address in memory unit where instruction resides
GenerationProduced by Central Processing Unit (CPU)Computed by Memory Management Unit (MMU)
AccessibilityIt is used to access physical address indirectlyCan't be accessed directly
Address SpaceA set of all logical addresses formed during program executionA set of all physical addresses available in the system which is mapped analogously with logical addresses
ExistenceNot physically existPhysically exist
AlterationVariesConstant
RebootVanishedExist
VisibilityCan be ViewedCan't be viewed

Physical address & Physical Address space

A physical address is the actual location of stored instruction. All set of physical addresses present in the system is termed as the system’s physical address space.

A Physical address space is defined in a memory unit which is computed using MMU and represented in binary form. It is also known as a real address.

Logical Address and Logical Address space

A logical address is an address that is used to fetch an instruction while a program in execution. And the sum of all the addresses required in the execution of the process is known as the logical address space of the process.

A logical address is defined by CPU and it is termed as Virtual address.


About Memory Management Unit


The process of mapping logical addresses to physical addresses of a program (or process) is known as Address Binding. It is done in three ways, compile-time binding, load time-binding and runtime binding.

At the time of Compile-time and load time-binding, both physical and logical addresses are similar, even though it becomes varies at runtime binding. To deal with this difference,
A device called MMU ( memory management unit) is used to map the logical address to physical address.

 

Key differences 

Definition

Logical Address is an address of an instruction that is accessed during program or process execution.
A physical address is an address in memory unit where instruction resides.

Generation

It is produced by Central Processing Unit at the time of program execution, whereas physical address is usually an area in the memory unit, responsible for accessing cells of main memory which is computed by Memory Management Unit (MMU) .

Accessibility
A logical address is used to access physical address, whereas Physical address can’t be accessed directly.

Address Space
A set of all logical addresses formed during program execution which is produced by CPU is termed as Logical address space,
A set of all physical addresses available in the system is referred to as physical address space which is mapped with logical addresses.

Existence
Since it is generated by CPU, there is no particular location actually exists in a memory unit. Therefore, it is also known as virtual memory. On another hand, the physical address is addressable and available in the memory unit.

Actual Data

Logical Address is the key to access the physical address in order to locate the actual instruction or data byte, whereas physical address is the actual place where instruction or data Byte exists.

Change
Logical address tends to change from time to time but A physical address remains the same.

Reboot
Since Logical Address doesn’t physically exist, when the system shuts down and boots again, the address no longer available. Whereas, Physical Address physical exists and therefore even after the system reboots it present