CITS2002 Systems Programming  
prev
CITS2002 CITS2002 schedule  

Swapping of Processes

Another solution is swapping: moving (part of) a process's memory to disk when it is not needed.

When none of the processes in main memory is Ready and more memory is required, the operating system swaps the memory of some of the Blocked processes to disk to reclaim some memory space. Such processes are moved to a new state: the Suspend state, a queue of processes that have been "kicked out" of main memory:

If desperate for even more memory, the operating system can similarly reclaim memory from Ready processes.
When memory becomes available, the operating system may now resume execution of a process from Suspend, or admit a process from New to Ready.

 


CITS2002 Systems Programming, Lecture 8, p14, 14th August 2024.