Open In App
Related Articles

Difference between Paging and Swapping in OS

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Swapping: Swapping is a process of swapping a process temporarily to a secondary memory from the main memory which is fast than 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 is directly proportional to the amount of memory swapped.

  

Paging: 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 :

SwappingPaging
It is the procedure of copying out the entire process.It is a technique of memory allocation.
Swapping occurs when whole process is transferred to the disk.Paging occurs when some part of the process is transferred to the disk.
In this, a 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.It is a concept used in Non-contiguous Memory Management.
Swapping is done by inactive processes.The only active process can perform paging.
It provides the direction regarding the solution.No suggestion is given regarding the solution in it.
Swapping copies the whole information, so is relatively slower.Paging is relatively faster than swapping.

Last Updated : 13 Jun, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads