Multiprogramming
![]() | It has been suggested that this article be merged into Computer multitasking. (Discuss) Proposed since February 2010. |
Computer multiprogramming is the allocation of computing resources to more than one concurrent application, job or user ("program" in this nomenclature). It is distinguishable from monoprogramming (or uniprogramming) in which only a single program may be run at a time.
In this context, the root word "program" does not necessarily refer to a compiled application, rather, any set of commands submitted for execution by a user or operator. Such "program" could include a script or job control stream and any included calls to macro-instructions, system utilities or application program modules. An entire, interactive, logged-in user session can be thought of as a "program" in this sense.
Initially, multiprogramming was sought in order to optimize use of a computer system, since time and processing resources were often wasted when a single job waited for human interaction. Multiprogramming was developed as a feature of operating systems in the late 1950s and came into common use in mainframe computing in the mid- to late 1960s. This followed the development of hardware systems that possessed the requisite circuit logic and instruction sets to facilitate the transfer of control between the operating system and one or more independent applications, users or job streams. The use of multiprogramming was enhanced by the arrival of [virtual memory] and [virtual machine] technology, which enabled individual programs to make use of memory and operating system resources as if other concurrently running programs were, for all practical purposes, non-existent and invisible to them.
Multiprogramming vs multitasking
Multiprogramming should be differentiated from multitasking. A program generally comprises numerous tasks, or steps in the execution of the program. Tasks frequently end with a request for input or output. In multiprogramming, the operating system identifies opportunities to interrupt one program and transfer control to another between tasks (e.g., when it is waiting for input/output). When this may occur is dependent upon the design of the programs being handled; a program may run for many hours before there is a chance to interrupt. By contrast, in multitasking this transfer of control is independent of the program design. Switches between programs usually occur rapidly to create the illusion that they are running concurrently.