context switch


context switch

[′kän‚text ‚swich] (computer science) The action of a central processing unit that suspends work on one process to work on another.

context switch

(operating system)When a multitasking operating systemstops running one process and starts running another. Manyoperating systems implement concurrency by maintainingseparate environments or "contexts" for each process. Theamount of separation between processes, and the amount ofinformation in a context, depends on the operating system butgenerally the OS should prevent processes interfering with eachother, e.g. by modifying each other's memory.

A context switch can be as simple as changing the value of theprogram counter and stack pointer or it might involveresetting the MMU to make a different set of memory pagesavailable.

In order to present the user with an impression of parallism,and to allow processes to respond quickly to external events,many systems will context switch tens or hundreds of times persecond.