What is Context switch?

Switching the process or thread running on a CPU. Registers, the program counter and other state are saved and restored, and switching processes also switches address spaces.

Field: OS & Hardware

Context switch in the explanations

Questions that mention Context switch (4)

  1. During a context switch, what must be saved for the process being switched out?
  2. Why can a process context switch degrade performance more than the time spent saving and restoring registers would suggest?
  3. What is the mechanism by which applications ask the OS to perform tasks such as file I/O?
  4. Which correctly compares a mutex (a lock that sleeps while waiting) with a spinlock?

Related terms

Stack pointer Page table TLB (translation lookaside buffer) Privileged mode Demand paging Mutex Spinlock ASID Copy-on-write Device driver

Back to the glossary