• A single user program cannot keep the CPU busy at all the time. The OS can put many user programs in the memory and let the CPU execute instructions of one program while another program is busy with I/O operation. This technique is called multi-programming.
  • Multi-programming increases CPU utilization by organizing jobs so that CPU always executes one job. The operating system keeps similar jobs in memory simultaneously, which are kept in the job pool.
  • The operating system selects and begins to execute one of the job in the memory when the job has to wait for some task such as input/output operation to complete, it executes another job.

Multi-Programming OS

  • In non-multi-programming operating system CPU will sit idle. In multi-programming system, the CPU switches to execute another job when that job needs to wait; the CPU is switched to another job and so on.
  • When the first job finishes waiting for I/O operation, it gets the CPU back to complete its task. In this type of environment, the CPU never becomes idle.
  • Multi-programming is the first instance where the OS must take decisions for the users based on its priority. If similar jobs are ready to be brought into memory and if there is not enough room for all then the system must decide among them. Making this decision is called decision scheduling.
  • When the operating system selects the job from the job pool, it loads that job into memory for execution. If similar jobs are ready to run, the system must decide among them. Making this decision is called CPU scheduling.
  • The multi-programming Kernel performs scheduling, memory management and I/O management.