Pre-emptive multi-tasking operating systems use involuntary context switching to provide the illusion of parallel processes even when the hardware supports only a single thread of execution. This allows for liveliness, responsiveness, and sometimes performance by time-slicing the CPU between processes through rapid context switching, where the execution state is stored and restored. While context switching was once expensive, cache improvements have reduced the cost so it is usually low compared to other operations, though excessive context switching can still be expensive.