Why is context switching between threads generally faster than between processes?
Last updated
Same-process threads share an address space, so a switch skips the page-table reload and TLB (translation cache) flush, which is the costliest part.
Only registers, PC, and stack pointer change, and CPU caches stay warm.
Switching to a thread in a different process costs as much as a process switch.