📜  加载时间和执行时间地址绑定之间的区别

📅  最后修改于: 2021-06-28 06:56:41             🧑  作者: Mango

先决条件–地址绑定方法

地址绑定是程序指令和数据与实际物理内存位置的关联。操作系统中有多种类型的地址绑定。

地址绑定有3种类型:

  1. 编译时地址绑定
  2. 加载时间地址绑定
  3. 执行时间地址绑定

在这里,我们比较加载时间和执行时间地址绑定,如下所示。

加载时间地址绑定:
在将程序加载到内存后,将完成这种地址绑定。加载时间地址绑定将通过操作内存管理器来完成。

执行时间或动态地址绑定:
即使将程序加载到内存中,地址绑定也将被推迟。程序将不断更改内存中的位置,直到执行程序为止。这种地址绑定类型将在程序执行时由处理器完成。

加载时间和执行时间地址绑定之间的区别:

Load Time Address Binding Execution Time Address Binding
Loader is responsible for the load time address binding. Execution time address binding is done by processor.
It generates physical address. It generates dynamic absolute address.
Load time address binding is done after loading the program into memory. Execution time address binding is done at the time of program execution.
Absolute address is converted to relocatable address. It helps in execution.
Instructions are loaded in memory. From memory instructions are executed by CPU.
It works with physical address. It works with dynamic absolute address.
It is static address binding. It is dynamic address binding.
It is done by operating system memory manager itself. It is done by processor at the time of program execution.