Multitasking (computing)

Multitasking is a term that describes when a computer operating system (OS) is performing more than once process at a time. OSs have been designed to multitask for many years, but they have not always had that ability. Some older OSs were single user/single task systems, which meant that only one user and only one program could be active at a time. A multiuser OS allows more than one user to access the computer at a time. A multitasking OS allows multiple programs to be executed at the same time.

87321277-100205.jpg87321277-100206.jpg

To perform multitasking, an OS will complete tasks (each task lasting only a fraction of a second) from various programs in a certain order. Although the computer is not actually performing more than one task at a time, it is performing each task quickly enough that it makes it seem that multiple programs are doing work at the exact same time. Even though the computer is not actually completing more than one task at a time, more than one program is open because the programs are saved on the central processing unit (CPU) and tasks from all the different programs are split up and executed at different times.

When multitasking, the computer will also choose to perform the tasks in the most efficient order possible. Performing these tasks in the most efficient order, rather than in a particular sequential order, allows the computer to seem to complete two different processes at the same time. The computer also tracks the tasks ordered by the system so it does not "forget" tasks or lose its place while processing tasks from different programs. The number of programs that can be run on a computer with a multitasking OS will vary depending on the sophistication of the OS and the type of hardware the computer contains.

Multitasking on personal computers started in the 1990s with the release of Microsoft's Windows 95. Other companies then released operating systems with this functionality. Today, multitasking OSs are the norm.

Preemptive and Cooperative Multitasking

Multitasking is a function of the operating system. To multitask, the OS has to choose to complete one task for a certain program. The way the OS makes that choice depends on the type of multitasking taking place.

Preemptive multitasking occurs when the programs running on a computer take turns receiving a set amount of processing time for their tasks. For example, a computer running two programs in the foreground and two more in the background will give each of the four programs a set amount of time for processing. However, the computer does not have to give each of the programs the same amount of processing time. The computer may give programs running in the background more time for processing because they are more important to the function of the computer. Other times, the computer gives equal processing time to all programs—no matter what the programs are.

Cooperative multitasking is different from preemptive in that not all the programs that are running are given time for processing. If one program is dominating the processor, the other programs may not be able to accomplish any processing. This form of multitasking is not as efficient as preemptive multitasking, and it is not popular in modern computing.

Multitasking, Multiprocessing, and Multithreading

Multitasking is related to a number of other processes that help computer programs run efficiently and quickly. As previously stated, multitasking is using an OS to perform tasks from multiple programs, seemingly at the same time. The word multiprocessing is sometimes used in place of multitasking, but the two processes do have differences. Both processes allow users to complete multiple tasks, but multitasking is performing multiple tasks with one CPU. Multiprocessing indicates that more than one CPU is completing the tasks.

Multithreading is another term that is often confused with multitasking. Multithreading is much like multitasking, but it breaks down tasks inside individual programs into separate threads. In multithreading, the OS and computer have to determine how to manage not only the tasks from different programs but also the different "threads" of tasks from each running program. Multithreading takes multitasking one step farther. Computers and users can see many benefits from multithreading. For example, multithreading makes CPU usage much more efficient, it improves the performance of the processor, and it makes the system more reliable.

Advantages of Multitasking and Multithreading

Multitasking benefits computer users because they can use two different applications (e.g., word processing software and database software) at the same time, even while both are completing operations (though the specific tasks are not being executed at the exact same time). This allows computer users to work in multiple programs at once. Users have more flexibility, which makes working on complex projects or problems simpler.

Multitasking and multithreading also have advantages for computer programmers. When an operating system is capable of completing more than one process at a time, a computer programmer can create software that is more flexible. A programmer creating software for a multitasking and multithreading OS can design a program that has two different threads of execution. One thread could be dealing with the interactions from the user, and the other thread could be working on another operation in the background. A program with this ability is able to do more work while maintaining a positive experience for the user.

Bibliography

"Advantages of Multitasking." Microsoft. Microsoft. Web. 13 Aug. 2015. https://msdn.microsoft.com/en-us/library/windows/desktop/ms681940(v=vs.85).aspx

"Definition of: Non-Preemptive Multitasking." PC Mag. PC Mag. Web. 14 Aug. 2015. http://www.pcmag.com/encyclopedia/term/48051/non-preemptive-multitasking

"Definition of: Preemptive Multitasking." PC Mag. PC Mag. Web. 14 Aug. 2015. http://www.pcmag.com/encyclopedia/term/49632/preemptive-multitasking

"Differences between Multithreading and Multitasking for Programmers." National Instruments. National Instruments Corporation. 20 Jan. 2014. Web. 14 Aug. 2015. http://www.ni.com/white-paper/6424/en/

Lemley, Linda. "Chapter 8: Operating Systems and Utility Programs." University of West Florida. University of West Florida. Web. 13 Aug. 2015. http://uwf.edu/clemley/cgs1570w/notes/Concepts-8.htm

"Multitasking." WhatIs.Com. TechTarget. Web 15 Aug. 2015. http://whatis.techtarget.com/definition/multitasking

Stokes, Jon. "Introduction to Multithreading, Superthreading and Hyperthreading." ARS Technica. Conde Nast. 3 Oct. 2002. Web. 14 Aug. 2015. http://arstechnica.com/features/2002/10/hyperthreading/

"When to Use Multitasking." Microsoft. Microsoft. Web. 13 Aug. 2015. https://msdn.microsoft.com/en-us/library/windows/desktop/ms687084(v=vs.85).aspx

Xu, Qingzheng, Na Wang, Lei Wang, Wei Li, and Qian Sun. "Multi-Task Optimization and Multi-Task Evolutionary Computation in the Past Five Years: A Brief Review." Mathematics, vol. 9, no. 8, 2021, DOI: 10.3390/math9080864 . Accessed 29 Dec. 2022.