Operating Systems
Multitasking
Definition
Multitasking is the concurrent execution of multiple tasks (also known as processes) over a certain period of time. The OS achieves this by quickly switching between tasks, a process known as context switching.
Why It Matters
Multitasking is what allows you to run multiple applications—like a web browser, a word processor, and a music player—at the same time on your computer, making it a much more powerful and useful tool.
Contextual Example
The OS process scheduler gives each running application a small slice of CPU time. It switches between them so rapidly that it creates the illusion that they are all running simultaneously.
Common Misunderstandings
- There are two main types: preemptive multitasking (where the OS can forcibly interrupt a task, used in all modern OSes) and cooperative multitasking (where a task must voluntarily give up control, used in older OSes like Windows 3.1).
- This is a form of concurrency, not necessarily parallelism.