Can there be a Mode Switch without context switch with processes in Linux?
Mode Switch depicts a switch from user mode to kernel mode or the other way around. Context switch usually means when you switch to run a another process instead of the currently running one.
From what I learned, mode switch can occur only if an exception was thrown. Then the exception handler is called and decides, by looking at the exception table, what to do. But doesn't this count as a context switch? Since now the CPU performs the code of the exception handler and not the code of the process.
In addition, I know that the exception handler is necessary in order to save some needed registers for the process, and when the mode switches back to the user, the handler has to restore those registers.
So, can there really be a mode switch without context switch?
Help would be appreciated.