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.
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.
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 :
|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.|