Swap Partition :
- Swap Partition is a reserve area in HDD created by administrator during the installation of linux.
- The size of swap should be double of RAM size.
- For example, If the RAM is of 2GB the swap will be of 4GB.
- When RAM run out of space, OS enable the swap partition.
For Example :
- Free RAM equal to 100MB program P require 125MB, OS activate swap partition,program P is divided in two part P1(100MB) stored into RAM and part P2(25MB) stored into swap partition.
- When P1 required any data of P2, unrequired part of P1 is swapped out and required part of P2 swapped in.
A program of higher size can be written in available RAM size.