Why compile time & load time address binding generate identical physical and logical addresses while execution time address binding generate different physical & logical addresses?
Why compile time & load time address binding generate identical physical and logical addresses
Share
It has been long since this question was asked but I am just adding the answer for archiving purposes.
Let us have a look at the following definition:
Logical address: Address generated by CPUPhysical address: Addresses as seen by memory-management unit(MMU)Now in
compile time bindingwe assume that a range of memory location will always be available(which is sufficient for the program) and absolute code is generated. So whatever addresses CPU generates(like pointer addresses etc.) are same as what is seen by MMU.A better version of memory utilization is to delay binding till the load time so that the memory is not used used by the program sitting on disk. For this the code generated in relocatable format. This is
load time binding.Now
execution time bindingis a bit different where binding is delayed till execution time. In this case the CPU generates an address, let us say300, and do all manipulation on address300but whenever there is an actual memory access this address is transformed by adding the value of relocatable register, let us sayR, to this address. So logical address range is0-LIMwhile physical address space isR-(R+LIM).Let me also explain it with an example so that it becomes more clear:
Consider swapping if you swapped a program with
load time bindingyou need to swap it back to the same location(as all addresses in the instructions were bidden according to this address) while inexecution time bindingyou can swap back any process to any place because you only need to change the value in the relocatable register and it will just work fine. Hence increasing memory utilization.