0% found this document useful (0 votes)
45 views1 page

Memory Swapping Explained

Swapping is a technique where inactive programs are temporarily removed from memory and placed on a backing store to free up space for active programs. When a program needs to execute again, it is swapped back into memory from the backing store. In a multi-programming environment with round robin CPU scheduling, when a process' time quantum expires it is swapped out and a new process is swapped in. Similarly, with priority-based scheduling a lower priority process running will be swapped out for a higher priority process that arrives. Swapping requires sufficient backing store space to hold copies of all memory images.

Uploaded by

Mayur Vashist
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views1 page

Memory Swapping Explained

Swapping is a technique where inactive programs are temporarily removed from memory and placed on a backing store to free up space for active programs. When a program needs to execute again, it is swapped back into memory from the backing store. In a multi-programming environment with round robin CPU scheduling, when a process' time quantum expires it is swapped out and a new process is swapped in. Similarly, with priority-based scheduling a lower priority process running will be swapped out for a higher priority process that arrives. Swapping requires sufficient backing store space to hold copies of all memory images.

Uploaded by

Mayur Vashist
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Swapping: Swapping is a technique of temporarily removing inactive programs from the memory of the system.

A process can be swapped temporarily out of the memory to a backing store and then brought back in to the memory for continuing the execution. This process is called swapping. Eg: In a multiprogramming environment with a round robin CPU scheduling whenever the time quantum expires then the process that has just finished is swapped out and a new process swaps in to the memory for execution. A variation of swap is priority based scheduling. When a low priority is executing and if a high priority process arrives then a low priority will be swapped out and high priority is allowed for execution. This process is also called as Roll out and Roll in. Normally the process which is swapped out will be swapped back to the same memory space that is occupied previously. This depends upon address binding. If the binding is done at load time, then the process is moved to same memory location. If the binding is done at run time, then the process is moved to different memory location. This is because the physical address is computed during run time. Swapping requires backing store and it should be large enough to accommodate the copies of all memory images The system maintains a ready queue consisting of all the processes whose memory images are on the backing store or in memory that are ready to run. Swapping is constant by other factors: To swap a process, it should be completely idle. A process may be waiting for an i/o operation. If the i/o is asynchronously accessing the user memory for i/o buffers, then the process cannot be swapped.

You might also like