Difference between Paging and Swapping in OS

Swapping is a process of swapping a process temporarily to a secondary memory from main memory which is fast as compared to secondary memory. But as RAM is of less size so the process that is inactive is transferred to secondary memory. The main part of swapping is transferred time and the total time directly proportional to the amount of memory swapped.

Paging is the procedure of memory allocation where different non-contiguous blocks of memory are assigned a fixed size. The size is generally of 4KB. The paging is always performed between active pages.

Difference between Paging and Swapping :

Swapping Paging
It is procedure of copying out the entire process. It is a technique of memory allocation.
Swapping occurs when whole process is transferred to disk. Paging occurs when some part of process is transferres to disk.
In this process is swapped temporarily from main memory to secondary memory. In this the contiguous block of memory is made non-contiguous but of fixed size called frame or pages.
Swapping can be performed without any memory management. Non-contiguous Memory Management.
Swapping is done by inactive processes. Only active process can perform paging.
It provides the direction regarding the solution. No suggestion is given regarding the solution in it.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.