utilization. The idea is
relatively simple. A process is executed until it must wait, typically for the
completion of some I/O request. In a simple computer system, the CPU then just sits
idle. All this waiting time is wasted; no useful work is accomplished. With
multiprogramming, we try to use this time productively. Several processes are kept in
memory at one time. When one process has to wait, the operating system takes the
CPU away from that process and gives the CPU to another process. This pattern
continues. Every time one process has to wait, another process can take over the use
of the CPU.Scheduling of this kind is a fundamental operating-system function. Almost all
computer resources are scheduled before use. The CPU is, of course, one of the
primary computer resources. Thus, its scheduling is central to operating-system
design
.