Introduction:-A program resides on a disk a binary executable file. To be executed, the program must be brought into memory and placed within a process. The processes on the disk that are waiting to be brought into memory for execution form the input queue.
One process from the input queue is selected and loaded into memory. As the process is executed, it accesses instructions and data from memory. Later the process terminates and its memory space is declared available.
A user program goes through the following the steps before getting executed. Addresses may be represented in different ways during these steps.
The binding of instructions and data to memory addresses can be done at:
Compile time – If you know at compile time, where the process will reside in memory, then absolute code can be generated.
Load time – If it is not known at compile time where the process will reside in memory, then the compiler must generate relocatable code. Final binding is delayed until load time.
Execution time – If the process can be moved during its execution from one memory segment to another, then binding must be delayed until run time.