Computer Science; Operating Systems
A multitasking operating system (OS) is one that can work on more than one task at a time by switching between the tasks very rapidly. The tasks may all pertain to a single user or to multiple users. A multitasking OS can save the current state of each user and task so that it does not lose its place when it comes back to a task to resume its work. This allows the system to switch smoothly between tasks.
Multitasking operating systems (OSs) are based on the idea of time-sharing. Multitasking OSs do not actually perform multiple tasks at the same exact time. A particular central processing unit (CPU) can only do one thing at any given moment. Instead, they give the appearance of multitasking by switching back and forth between separate tasks for intervals of time too small for humans to perceive. This makes it seem to the user that multiple tasks are being carried out at once.
Multitasking OSs can take a variety of forms. One difference is the way in which they handle the context switch between different users and tasks. A multitasking OS must have some way of deciding when is the appropriate time to make a context switch. The switch requires processing resources in order to be correctly executed, and switching contexts at random would reduce the system's predictability and efficiency over time. One method of deciding the timing of context switching is cooperative multitasking. With this method, the OS will not interrupt a process with a context switch while the process is running but will instead wait for the process to finish.
An alternative approach is preemptive multitasking. Unlike cooperative multitasking, preemptive multitasking does not wait for a process to finish before initiating a context switch. Instead, a multitasking OS using preemption will automatically switch between processes at defined intervals. This allocates resources evenly among all processes. This can be more resource intensive because it requires the system to store information about each process state. That way, the process can smoothly resume when its turn comes round again.
Sometimes, other events can intrude on the OS's time-sharing. An example is hardware interruption. This occurs when a device attached to the computer (such as a printer, scanner, or disk drive) requires the attention of the OS. It sends an interrupt signal to the CPU. This might occur when a printer experiences a paper jam, for instance. It would interrupt the computer's multitasking in order to signal the computer to display an error message to the user.
Multitasking OSs must often assign different priority levels to different processes. One reason for this is that some processes have more of an impact on the user's real-time experience than others do. If a computer were busy keeping track of the time and preparing a system backup when a user closed an application window, the OS would prioritize the tasks associated with closing the window ahead of the others. Doing this gives the user the impression that the computer is operating smoothly. This would not be the case if the window being closed were to freeze in place until the conclusion of the backup process.
Multitasking places heavy demands on a computer. The computer must store enough information about each process to be able to quickly return to the task where it left off. As applications have grown more complex and more reliant on multitasking, hardware has struggled to keep pace. Each year, computers are brought to market with more memory, faster processors, and other hardware upgrades necessary for computers to do more work in less time.
—Scott Zimmer, JD
Ben-Ari, M. Principles of Concurrent and Distributed Programming. 2nd ed. New York: Addison, 2006. Print.
Hart, Archibald D., and Sylvia Hart Frejd. The Digital Invasion: How Technology Is Shaping You and Your Relationships. Grand Rapids: Baker, 2013. Print.
Kaptelinin, Victor, and Mary P. Czerwinski, eds. Beyond the Desktop Metaphor: Designing Integrated Digital Work Environments. Cambridge: MIT P, 2007. Print.
Lee, John D., and Alex Kirlik, eds. The Oxford Handbook of Cognitive Engineering. New York: Oxford UP, 2013. Print.
Sinnen, Oliver. Task Scheduling for Parallel Systems. Hoboken: Wiley, 2007. Print.
Walker, Henry M. The Tao of Computing. 2nd ed. Boca Raton: CRC, 2013. Print.