What is the difference between Compile time, Load time and Execution time?
Context:
Classically, the binding of instructions and data to memory addresses can be done at any step along the way:
Compile time. The compiler translates symbolic addresses to absolute addresses. If you know at compile time where the process will reside in memory, then absolute code can be generated (Static).
Load time. The compiler translates symbolic addresses to relative (relocatable) addresses. The loader translates these to absolute addresses. If it is not known at compile time where the process will reside in memory, then the compiler must generate relocatable code (Static).
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. The absolute addresses are generated by hardware. Most general-purpose OSs use this method (Dynamic).
Execution Time is the time that your program takes to execute. For example, 10 seconds, or 10 milliseconds. Running time might be used interchangeably with execution time (how much time it takes for your program to terminate).
compilation process converts source code into machine code while as execution means that machine code is ready for processing.
Execution time refers to the stage at which the instructions in the computer programs/code are executed. At execution time, run-time libraries are used. Some basic operations that occur at execution time include reading program instructions to carry out tasks or complete actions.
Compile time address binding is done before loading the program into memory. Load time address binding is done after loading the program into memory. Instructions are translated into absolute address.
These terms seem self explanatory to me, but here's an attempt at describing them. Links for further reading are included.
Compile time is when your code is being processed by a compiler. In this context, it's talking about a compiler that is transforming your code into an executable binary.
Load time is when the Operating System is reading an executable from long term storage (typically a hard drive) and loading it into short term memory (RAM) from which it can be executed. Generally the hard drive is too slow to feed the CPU, so fast memory is used to store instructions/programs that the CPU is getting ready to execute. This is also when the initial memory allocation is reserved and initialized for use by the program.
Execution time is when a program is executing or running. The instructions are in memory and are being processed by the CPU. Additional memory may be allocated and/or deallocated at this time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With