Computer multitasking

related topics
{system, computer, user}
{math, number, function}
{day, year, event}
{group, member, jewish}
{law, state, case}
{war, force, army}
{work, book, publish}

In computing, multitasking is a method by which multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with a single CPU, only one task is said to be running at any point in time, meaning that the CPU is actively executing instructions for that task. Multitasking solves the problem by scheduling which task may be the one running at any given time, and when another waiting task gets a turn. The act of reassigning a CPU from one task to another one is called a context switch. When context switches occur frequently enough the illusion of parallelism is achieved. Even on computers with more than one CPU (called multiprocessor machines), multitasking allows many more tasks to be run than there are CPUs.

Operating systems may adopt one of many different scheduling strategies, which generally fall into the following categories:

  • In multiprogramming systems, the running task keeps running until it performs an operation that requires waiting for an external event (e.g. reading from a tape) or until the computer's scheduler forcibly swaps the running task out of the CPU. Multiprogramming systems are designed to maximize CPU usage.
  • In time-sharing systems, the running task is required to relinquish the CPU, either voluntarily or by an external event such as a hardware interrupt. Time sharing systems are designed to allow several programs to execute apparently simultaneously. The expression 'time sharing' was usually used to designate computers shared by interactive users at terminals, such as IBM's TSO, and VM/CMS
  • In real-time systems, some waiting tasks are guaranteed to be given the CPU when an external event occurs. Real time systems are designed to control mechanical devices such as industrial robots, which require timely processing.

The term time-sharing is no longer commonly used, having been replaced by simply multitasking, and by the advent of personal computers and workstations rather than shared interactive systems.

Contents

Multiprogramming

In the early days of computing, CPU time was expensive, and peripherals were very slow. When the computer ran a program that needed access to a peripheral, the CPU would have to stop executing program instructions while the peripheral processed the data. This was deemed very inefficient. The first computer using a multitasking system was the British Leo III owned by J. Lyons and Co.. Several different programs in batch were loaded in the computer memory, and the first one began to run. When the first program reached an instruction waiting for a peripheral, the context of this program was stored away, and the second program in memory was given a chance to run. The process continued until all programs finished running.

Full article ▸

related documents
Reduced instruction set computer
Direct Connect (file sharing)
Amstrad CPC
10 Gigabit Ethernet
Mandriva Linux
Commodore 1541
Session Initiation Protocol
Handoff
Quality of service
X Window System
Pulse-code modulation
Genera (operating system)
Virtual memory
BIOS
Universal asynchronous receiver/transmitter
DV
RS-232
Flip-flop (electronics)
Set-top box
X10 (industry standard)
Webcam
Digital Enhanced Cordless Telecommunications
RT-11
Microsoft Windows
Computer software
File Transfer Protocol
Rectifier
Throughput
Workstation
IEEE 802.11