Context Switch: A context switch also called as process switch or task switch is the switching of CPU from one process or thread to another. Context switch involves saving the current CPU information, updating the control information and restore the CPU information.
A context is contents of CPU’s registers and program counter. Context switch is a overhead and its depended on hardware. Context switches can occur only in kernel mode. When process switch occured then these information is stored for program counter, accounting information, scheduling information, base and limit register value, I/O state information, currently used register etc.