Memory  Management                                                                                                                                   Print this page
<< Previous |  First |  Last |  Next >>       

To utilize the idle time of CPU, we are shifting the paradigm from uniprogram environment to multiprogram environment.
Since the size of main memory is fixed, it is possible to accomodate only few process in the main memory. If all are waiting for I/O operation, then again CPU remains idle.
To utilize the idle time of CPU, some of the process must be off loaded from the memory and new process must be brought to this memory place. This is known swapping.

What is swapping :

      1. The process waiting for some I/O to complete, must stored back in disk.
      2. New ready process is swapped in to main memory as space becomes available.
      3. As process completes, it is moved out of main memory.
      4. If none of the processes in memory are ready,
        • Swapped out a block process to intermediate queue of blocked process.
        • Swapped in a ready process from the ready queue.

But swapping is an I/O process, so it also takes time. Instead of remain in idle state of CPU, sometimes it is advantageous to swapped in a ready process and start executing it.
The main question arises where to put a new process in the main memory. It must be done in such a way that the memory is utilized properly.

<< Previous |  First |  Last |  Next >>