Create AI Video
Create AI Video

What is Swapping?

Hardik Jain 22222795101
2024-03-14 22:34:25
Swapping is a simple memory or process management method used by the operating system.This method is dedicated to increasing the utilization of the processor by moving blocks of data in and out of the main memory.The concept of swapping consists of two more concepts, swap in and swap out.1. Swap Out: It is the method of removing a process from the RAM and adding it to the Hard Disk.2. Swap in: means, removing the program from the hard disk and placing it back into the main memory or the RAM.A process can be swapped temporarily out of memory to a backing store, and then brought back into memory for continued executionBacking store is a fast disk large enough to accommodate copies of all memory images for all users; must provide direct access to these memory images.Roll out and roll in are swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executedMajor part of swap time is transfer time; total transfer time is directly proportional to the amount of memory swappedAdvantages of Swapping:1. The process helps the CPU to managemultiple processes within the same mainmemory.2. The method helps to create and use VirtualMemory.3. The method is economical.Disadvantages of Swapping:1.In the case of heavy swapping activity, if the computer system loses power, the user might lose all the information related to the program.2.Inefficiency may arise in the case where a resources or a variable is commonly used by the processes which are participating in the swapping process.

Related Videos