Description
A context switch is the process of storing the state of a process, thread, or processor operating mode so that it can be restored at a later point to resume execution.
This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (November 2009) (Learn how and when to remove this template message) |
This article may be incomprehensible or very hard to understand.October 2017) (Learn how and when to remove this template message) ( |
In computing, a context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. This allows multiple processes to share a single CPU, and is an essential feature of a multitasking operating system.
The precise meaning of the phrase “context switch” varies. In a multitasking context, it refers to the process of storing the system state for one task, so that task can be paused and another task resumed. A context switch can also occur as the result of an interrupt, such as when a task needs to access disk storage, freeing up CPU time for other tasks. Some operating systems also require a context switch to move between user mode and kernel mode tasks. The process of context switching can have a negative impact on system performance.
« Back to Glossary Index