Multitasking¶
Category: Foundations · Status: stub
One line: An operating system or runtime running several tasks over the same period by switching between them — by force (preemptive) or when a task gives way (cooperative).
How it connects¶
flowchart LR
n_context_switch["Context switch"]
n_multitasking["Multitasking"]
n_multitasking -->|uses| n_context_switch
classDef center stroke-width:3px
class n_multitasking center
classDef outside stroke-dasharray: 4 3
class n_context_switch outside
- Is built on: Context switch
- See also: Concurrency, Cooperative scheduling, Preemptive scheduling
In each language¶
| The operating system | sched(7) ↗: Linux decides which thread runs next by scheduling policy and priority, and preempts the one running |
Where to read more¶
- In the books: Grokking Concurrency, Kirill Bobrov — ch. 6, 'Multitasking'
- In the books: Asynchronous Programming in Rust, Carl Fredrik Samson — ch. 1, 'Concurrency and Asynchronous Programming: a Detailed Overview' → 'An evolutionary journey of multitasking'
- In the books: Python Concurrency with asyncio, Matthew Fowler — ch. 1, 'Getting to know asyncio' → 'Understanding concurrency, parallelism, and multitasking'
- In the books: Systems Programming in Unix/Linux, K. C. Wang — ch. 3, 'Process Management in Unix/Linux' → 'Multitasking'
- Notes: Multitasking - general ↗
- Reference: Wikipedia: Computer multitasking ↗