On this page
  1. Concurrency vs. Parallelism
  2. Contents
  3. Structure vs. Execution
  4. Processes, OS Threads & Coroutines

Concurrency vs. Parallelism

Prev: concurrency | Up: concurrency | Next: Synchronization & Coordination
Rel: Python Concurrency & Parallelism, JS Event Loop
Ref: Wikipedia โ€” Concurrency (Computer Science)
Tags: #public #prog #programming #concurrency


Contents


Structure vs. Execution


Processes, OS Threads & Coroutines

Unit Memory Space Scheduler Creation / Switch Cost
OS Process Isolated virtual memory OS kernel (preemptive) High (MBs, IPC needed)
OS Thread Shared heap, own stack OS kernel (preemptive) Medium (1โ€“8 MiB stack, syscall switch)
Coroutine / Green Thread Shared heap, tiny frame Language runtime / event loop Very low (KBs, scales to 100k+ tasks)

Linked from

Related notes