Question

How does the logical vs. physical address space affect compilation, linking, and loading?

How does the logical vs. physical address space affect compilation, linking, and loading?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

Physical address space:

Physical Address refers to location in memory unit(the one that is loaded into memory). The set of all physical addresses corresponding to these logical addresses is referred to as a physical address space.

Logical address space:

Logical address is generated by CPU in perspective of a program. The set of all logical addresses generated by a program is referred to as a logical address space.

Virtual and physical addresses are the same in compile-time and load-time address-binding schemes. Virtual and physical addresses differ in execution-time address-binding scheme.

Now question arises, How does the logical vs. physical address space affect compilation, linking, and loading?

An address binding can be done in three different ways:

Compilation: If you know that during compile time where process will reside in memory then absolute address is generated i.e physical address is embedded to the executable of the program during compilation. Loading the executable as a process in memory is very fast. But if the generated address space is preoccupied by other process, then the program crashes and it becomes necessary to recompile the program to change the address space.

Loading: If it is not known at the compile time where process will reside then relocatable address will be generated. Loader translates the relocatable address to absolute address. The base address of the process in main memory is added to all logical addresses by the loader to generate absolute address. In this if the base address of the process changes then we need to reload the process again.

Linking: The instructions are in memory and are being processed by the CPU. Additional memory may be allocated and/or deallocated at this time. This is used if process can be moved from one memory to another during execution(dynamic linking-Linking that is done during load or run time). e.g – Compaction.

Please give thumbsup, if you like it. Thanks.

Add a comment
Know the answer?
Add Answer to:
How does the logical vs. physical address space affect compilation, linking, and loading?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT