Ads block

Banner 728x90px

Swapping in Operating system

Swapping is a memory management technique in which a process can be temporarily out of main memory to back store(secondary device) so that the main memory can be made available for other processes and the previous process is brought back into memory for continued execution, when it is needed.

The main purpose of swapping is to obtain better utilization of main memory. In secondary memory, the place where the swapped-out process is stored is called swap space.

Swapping in OS

The swapping is used when the main memory not able to hold entire program at once. Main memory is used secondary decice to fulfill their requirements. Swapping brings the data present in secondary device to main memory so that the program can be fully executed.


Swapping works on two concepts: Swap-in and Swap-out.

  • Swap-out is used to removing a process from RAM and adding it to the hard disk.
  • Swap-in is used to removing a program from a secondary device and putting it back into the main memory.