Skip to content
Related Articles

Related Articles

Difference between Paging and Swapping in OS

View Discussion
Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 13 Jun, 2022
View Discussion
Improve Article
Save Article

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.
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!