contextswitch
Contextswitch, commonly referred to as a context switch, is the process by which a central processing unit stops executing one task and begins executing another. In multitasking operating systems, the CPU divides its time among multiple processes or threads, giving the illusion of parallelism even on single-processor systems.
During a context switch, the operating system saves the state of the currently running task so it
Context switches can be triggered by interrupts, system calls, I/O completions, or timer events, and can be
Performance considerations are central to context switching. Each switch incurs overhead from saving and restoring state,