In computing, multitasking
is a method where multiple tasks, also known as processes, are performed during the same period of time. While the preceding statement appears to be true to people using the computer, the computer can only be executing one machine instruction at any instant so in reality only one task can be running at any one time. Since it only takes the computer nanoseconds to execute a machine instruction it can switch between tasks many times a second making it appear to the user that the tasks are running at the same time. The tasks share common processing resources, such as a CPU and main memory. In the case of a computer with a single CPU, only one task can be running
at any instant 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. The term "multitasking" has become an international term, as the same word in many other languages such as German, Italian, Dutch, Danish and Norwegian.