Usually , a CPU is much faster compared to peripheral devices. While peripherals are performing certain operations the CPU may not be doing any work. It may be lying idle. To keep CPU busy for most of the time it is desirable to process a number of programs concurrently.When a computer processes several programs concurrently, such processing or execution of programs is called multiprogramming.
The term multiprogramming denotes an operating system that provides sophisticated forms of memory protection and enforces concurrency control when processes access shared I/O devices and files. Multiprogramming increases CPU utilization by organizing jobs so that the CPUalways has one to execute.
The idea is as follows- The operating system keeps several jobs in memory simultaneously. This set of jobs is a subset of the jobs kept in thejob pool. The operating system picks and begins to execute one of the jobs in the memory.
Eventually, the job may have to wait for some task, such as an I/O operation, to complete. In a non-multiprogramming system, the operating system switches to, and executes, another job. When that job needs to wait, the CPU is switched to another job, and so on. As soon as, the first job finishes waiting and gets the CPU back.
As long as at least one job needs to execute , the CPU is never idle.
For more of such hot topics read my other posts here :
Visit my new website