The correct answer is: D. All of the above
The loader is a program that loads another program into memory. It performs the following functions:
- Allocates space in memory for the programs and resolves symbolic references between object decks. The loader must find a place in memory for the program to be loaded, and it must also resolve any symbolic references in the program. Symbolic references are names that are used in the program instead of actual addresses. The loader must find the actual addresses that correspond to the symbolic references and replace them in the program.
- Adjusts all address dependent locations, such as address constants, to correspond to the allocated space. Once the program has been loaded into memory, the loader must adjust any address dependent locations in the program. Address dependent locations are locations in the program that contain addresses. The loader must update these addresses to reflect the new location of the program in memory.
- Physically places the machine instructions and data into memory. The final step of the loading process is to physically place the machine instructions and data into memory. The loader must do this in a way that ensures that the program will run correctly.
The loader is a critical part of the operating system. It is responsible for loading programs into memory so that they can be executed. Without the loader, it would not be possible to run programs on a computer.