I know that there are two types of stack in Linux : user stack when process running in user mode and switch to Kernel Stack during interrupts or when system call in made. The interruptions, more precisely, the interruption procedures, are the bridges between this two modes, kernel (0) and user (3). The interrupt vector table let the processor loads the right instruction address in the PC register, but how is the stack pointer register changed when it switches to kernel mode?
Are there separate stack pointers for each mode say user and kernel.
And during interrupt , is the interrupted tasks kernel stack is used for interrupt processing(i mean ISR)?. If there are two different stack pointers for user and kernel mode and how kernel intimate the cpu of the current process's kernel stack pointer.How this differnet kernel stacks are used in context switching? can some one elaborate or point out some articles on this topic?
Thanks in advance.