• In our previous post we had discussed about different address binding schemes. In this post we will discuss about logical and physical address and address spaces and how operating system deal with them. If you haven’t read yet, I strongly suggest you to first read that article as it will help you a lot for better understanding.
  • An address generated by the CPU is commonly known as logical address.
  • While an address seen by the MMU that is loaded into Memory Address Register is commonly referred to as physical address.
  • The compile time and load time address binding methods generate identical logical and physical addresses.
  • However the execution time address binding scheme results in different logical and physical addresses.
  • In this case it generates logical or virtual address.
  • The logical address space is a set of all logical addresses generated by a program (compiler). While the set of all physical addresses corresponding to logical addresses is a physical address space.
  • The hardware device MMU maps actual physical address from logical addresses. It is also called relocation of the program.
  • Relocation register (base register) is used to perform this mapping.
  • It contains an integer number. The CPU adds this number to every address generated by the program to map actual effective memory address.
  • e. Effective memory address = address used in instruction + content of relocation register.

Logical and Physical Address.

  • The user program never sees the real physical address, user deals only with logical address.
  • If logical address are in the range from 0 to max than all corresponding physical address are in the range of R to R + Max.(Where R= value of relocation register)
  • The user generates only logical addresses and thinks that process runs in 0 addresses to Max.