what is swapping in operating system

what is swapping in operating system

1 year ago 38
Nature

Swapping is a memory management technique used in operating systems to improve CPU utilization in multiprogramming by temporarily swapping a process from main memory to secondary memory, freeing up main memory for other processes. The purpose of swapping is to access data present in the hard disk and bring it to RAM so that application programs can use it. Swapping is used only when data is not present in RAM. The process of swapping affects the performance of the system, but it allows larger and multiple processes to run concurrently. Swapping is also known as memory compaction.

Swapping has two concepts: swap-in and swap-out. Swap-out is a technique for moving a process from RAM to the hard disk, while swap-in is a method of transferring a program from a hard disk to main memory or RAM. The CPU scheduler determines which processes are swapped in and which are swapped out.

Advantages of swapping include efficient utilization of memory resources and the ability to run larger and multiple processes concurrently. However, the swapping process can degrade system performance.

Read Entire Article