Multiprogramming, a term that refers to multiuser operating systems, is somewhat similar to the operation of a busy dentist’s office. The dentist concurrently attends to several patients in different rooms within a given time period.
The dentist may pull a tooth in room 1, move to room 2 to prepare a cavity for filling, move back to room 1 to treat the hole created by the pulled tooth, and so forth. As the dentist moves from patient to patient, assistants do minor tasks.
In a computer system with a multiprogrammed operating system, several applications programs may be stored in main memory at the same time. The CPU, like the dentist, works on only one program at a time.
ADVERTISEMENTS:
When it reaches a point in a program at which peripheral devices or other elements of the computer system must take over some of the work, the CPU interrupts processing to move on to another program, returning to the first program when that program is ready to be processed again.
While the computer is waiting on data for one program to be processed again. While the computer is waiting on data for one program to be accessed on disk, for example, it can perform calculations for another program.
The systems software for the disk unit works like the dental assistants- it does background work; in this case, retrieving the data stored on disk.
ADVERTISEMENTS:
Multiprogramming is feasible because computers can perform thousands of computations in the time it takes to ask for and receive a single piece of data from disk.
Such disk I/O operations are much slower than computation, because the computer must interact with and receive communications from an external device to obtain the data it needs. It must also contend with the slower access speeds of secondary storage.