During Context Switching, the kernel saves the state of current process (process1) and restores the state of the other process (process2) into CPU (loads the various registers with the previous values for process2).
Which memory area the kernel saves the state of process1 when it is swapped out? Is it in the stack area of process1 or is it in some place within kernel itself? Thanks in advance.