multitasking, the running of multiple programs (sets of instructions) in one computer at the same time. Multitasking is used to keep all of a computer’s resources at work as much of the time as possible. It is controlled by the operating system, which loads programs into the computer for processing and oversees their execution until they are finished.
Multitasking involves overlapping and interleaving the execution of several programs. This is often achieved by capitalizing on the difference between a computer’s rapid processing capacity and the slower rates of its input/output devices. While the computer is reading data from a disk at a fairly limited rate, for example, its powerful central processor can execute at high speed another program that involves extensive calculations but very little input. Operating systems coordinate the competing demands of various programs in a variety of ways. Multiple programs can be executed on a computer using a foreground/background system, in which the computer executes the instructions of one program only in between the times it devotes to running other programs of higher priority. Such a system makes use of idle times in some tasks, such as the minute delays between keyboard entries, to execute instructions in the background program. In many multitasking operations, a computer’s microprocessors switch their attention back and forth between different programs in fractions of seconds.