交换:
交换是将进程从主存储器临时交换到辅助存储器的过程,与辅助存储器相比,速度更快。但由于 RAM 较小,因此不活动的进程将转移到辅助存储器。交换的主要部分是传输时间,总时间与交换的内存量成正比。
分页:
分页是内存分配的过程,其中不同的非连续内存块被分配固定大小。大小一般为4KB。分页总是在活动页面之间执行。
分页和交换的区别:
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. |