= Solution
Both kinds of <context switch> save and restore registers, a program counter, stack pointer and scheduler state. Switching between <operating-system processes> additionally changes the address-space and protection context, including the page-table root. Cached translations must be invalidated or distinguished by address-space identifiers, and the new process may have a different memory and cache locality.
<Software threads> of one process share its address space and most resources, so a thread switch normally preserves the page-table root and valid cached translations; only the execution context, stack and thread-specific state need change. Thus \b[a process switch requires address-space management which a same-process thread switch usually avoids]. Tagged translation caches can reduce the extra cost, so a complete <translation lookaside buffer> flush is not an inevitable feature of every process switch.
Back to article page