As I understood before, each process has its own address space called vitual address space or program memory, and every process has a location called stack which is used to store local variables and parameters of a function.
Also, when an exception occurs the processor (say an ARM cortex-A) switches to privileged mode and then branches to the exception handler.
According to what I understood, most applications run in non-privileged user mode, and this mode has a special register called stack pointer to hold the address of top of the stack; but this is a single register and can't actually hold the address of top of the stack of several processes at the same time. Would you please explain what actually happens?