title: Saving the values of hardware registers for a process during context switching
body: <p>Whenever an interrupt occurs, processor stores the current state in cpu registers.In <a href="https://en.wikipedia.org/wiki/Process_control_block" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Process_control_block</a> , it is mentioned that when context switching occurs, kernel saves the contents of cpu or hardware registers for the interrupted process in the kernel.In one case, the current values of cpu registers are saved in the cpu itself and in the other case, it is saved in the kernel.Is it correct? Whether context switching is treated differently when compared to a normal interrupt? Ultimately it is also a form of interrupt... right ?</p>