A loader is a system program that loads an executable program from secondary storage into main memory (RAM) so that the CPU can execute it. It also prepares the required memory and addresses before execution begins.
A loader is a system program that loads an executable program from secondary storage into main memory (RAM) so that the CPU can execute it. It also prepares the required memory and addresses before execution begins.
Think about opening Microsoft Word. The program is stored on your computer's storage. When you click its icon, the operating system loads the required program into RAM so that the CPU can start running it.
The loader finds the executable program stored on secondary storage such as an HDD or SSD.
The executable program is copied from storage into the required locations in main memory (RAM).
The loader prepares the memory layout and adjusts addresses when required so that the program can run correctly.
After the program is ready in memory, control is transferred to the program's entry point and execution begins.
| Type | Meaning |
|---|---|
| Absolute Loader | Loads the program at a fixed memory address. |
| Relocating Loader | Can load the program at different memory locations by adjusting addresses. |
The process of starting or resetting a computer is called Booting. It connects the initial hardware startup with loading the operating system into main memory so that the computer becomes ready for use.
When the power button is pressed, the power supply provides power to the motherboard. The CPU starts from a predefined location called the Reset Vector, which points to the system firmware such as BIOS or UEFI.
The BIOS or UEFI performs POST to check whether important hardware components are working properly.
If a critical hardware problem is detected, the firmware may report the problem through error messages or diagnostic signals.
After POST, the firmware checks the configured boot order to find a bootable storage device such as an SSD, HDD, or USB drive.
On traditional BIOS-based systems, boot information may involve the Master Boot Record (MBR). Modern UEFI systems generally use the EFI System Partition (ESP) and a boot manager.
The firmware starts the system's bootloader. Examples include Windows Boot Manager and GRUB for Linux systems.
The bootloader prepares the next stage of the startup process and locates the operating system kernel.
The bootloader loads the OS Kernel into RAM and transfers control to it. The kernel then initializes the operating environment and starts the required system services and drivers.
After the kernel and essential services are initialized, the operating system starts its user environment, such as a GUI or CLI, and the computer becomes ready for use.
When you switch on a computer, the firmware first checks the hardware, finds a bootable device, starts the bootloader, and the bootloader loads the operating system kernel into RAM. The kernel then starts the operating system.
| Loader | Bootloader |
|---|---|
| Loads an executable program into main memory for execution. | Starts the operating system boot process and loads the OS kernel. |
| Usually works with normal executable programs. | Works during system startup. |
| Prepares a program for CPU execution. | Prepares and transfers control to the operating system. |
Loader → Loads a program into RAM
Bootloader → Loads/starts the operating system
The linker creates the executable, while the loader puts that executable into RAM so the CPU can run it.
| Point | Remember |
|---|---|
| Input | Executable file |
| Main Job | Load program into RAM for execution |
| Memory | Main Memory / RAM |
| Types | Absolute Loader, Relocating Loader |
| Final Action | Transfers control to the program |
Watch a simple Hindi explanation of loader and the program execution process.
A short handwritten-style revision sheet for Loader will be provided here.
Use the mind map for quick revision of loader, memory loading and program execution.