This is a very simple question, a mind-boggling thing from the day I learned about the concept of virtual and physical memory in my OS class. Now I know that at boot time and compile time, the binding scheme for virtual addresses and logical addresses is the same, but at runtime they are different.
First of all, why is it profitable to generate a virtual address at compilation and load time, and what returns when we use the ampersand operator to get the address of a variable, naive data types, user-defined addresses of types and functions?
And how does the OS map accurately from virtual to physical address when it does it? These questions are curious, and I would like to get good and deep ideas, given the modern OS. "As it was in the early days of the OS. I am only C / C ++, since I know little about other languages.
source
share