Program execution,loading linking source program compiler or compile assembler time object Program must be placed within a other module object process for it to be executed modules linkage User programs:Where to place editor the program? system load load library module time dynamically loader loaded system in-memory library binary execution memory time (run image time 口”“8卡4在卡4色, 2Q0
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Program execution, loading & linking ▶ Program must be placed within a process for it to be executed ▶ User programs: Where to place the program? dynamically loaded system library system library other object modules in-memory binary memory image loader load module linkage editor object module compiler or assembler source program execution time (run time load time { compile time
Address Types Logical address Physical address CPU MM Virtual address Absolute address Absolute address(绝对地址):Address seen by the memory unit ALSO:Physical address(物理地址) Relative address(相对地址) ALSO:Linear address(线性地址) Logical address(逻辑地址):Generated by the CPU ALSO:Virtual address(虚拟地址) 4口”484在4色,主月QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address Types CPU Logical address Virtual address MM Physical address Absolute address ▶ Absolute address (绝对地址): Address seen by the memory unit ALSO: Physical address (物理地址) ▶ Relative address (相对地址) ALSO: Linear address (线性地址) ▶ Logical address (逻辑地址): Generated by the CPU ALSO: Virtual address (虚拟地址)
Logical vs.Physical Address Space Logical address space: the set of all logical addrs generated by a program Physical address space: the set of all physical addrs Logical address Physical address MM LAS PAS WHEN can the absolute address can be decided? 4口”4814在4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logical vs. Physical Address Space ▶ Logical address space: the set of all logical addrs generated by a program ▶ Physical address space: the set of all physical addrs LAS CPU Logical address PAS MM Physical address ▶ WHEN can the absolute address can be decided?
Logical vs.Physical Address Space Logical address space: the set of all logical addrs generated by a program Physical address space: the set of all physical addrs CPU Logical address Physical address MM LAS PAS WHEN can the absolute address can be decided? 4口”4814在4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logical vs. Physical Address Space ▶ Logical address space: the set of all logical addrs generated by a program ▶ Physical address space: the set of all physical addrs LAS CPU Logical address PAS MM Physical address ▶ WHEN can the absolute address can be decided?
Example if program was loaded at 0x5000,the real codes processor execute are: 0x0000 0x5000 444440 mov ax,SymbolA 0x0100 ba010580 0x5100 ba015580 mov bx,SymbolB 0x0110 ba020590 0x5110 ba025590 jmp Label1 0x0140 ea000200 0x5140 ea005200 44 Label1:exit 0x0200 eb 0x5200 eb relative address LA=PA 4口”4814在4色,主QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example if program was loaded at 0x5000, the real codes processor execute are: 0x0000 ...... 0x5000 ...... ...... ...... mov ax, SymbolA 0x0100 ba010580 0x5100 ba015580 mov bx, SymbolB ⇒ 0x0110 ba020590 ⇒ 0x5110 ba025590 ... ... ... jmp Label1 0x0140 ea000200 0x5140 ea005200 ... ... ... Label1: exit 0x0200 eb 0x5200 eb relative address LA = PA