-
+
THE CONTEXT SWITCH
- What is a context switch?
- save all register values for current process (on stack)
- restore all register values for next process
- On a virtual memory machine, the same address in 2 different
processes rarely refers to the same physical memory. Such systems
map VM addresses to physical memory.
- Translation Lookaside Buffer (TLB)
- must invalidate when switching between processes
- contents of cache are also (probably) invalid
Summary
The cost of a context switch is not just the register save/restore,
but the impact of TLB & cache invalidation