3 ms·
Thread switching is much cheaper than process switching. Threads are just stacks. Processes are whole address spaces. All kinds of caches need to be flushed wh
by kentonv 4y ago
Thread switching is much cheaper than process switching.
Threads are just stacks. Processes are whole address spaces. All kinds of caches need to be flushed when you switch processes (especially if you have more processes than you have PCID entries), but not when switching threads.