I'm confused of user/kernel thread and mode/context switch (Platform: Linux)
I have two linked questions.
(1) Is the below sentence right?
If I make a system call, then mode switch (user mode to kernel mode) will occur and eventually switching from user thread to kernel thread happens.
Since system call can only be executed in kernel thread, I think mode switch must occur the switching from the user thread to kernel thread.
(2) Then, what we call the overhead of mode switching is that switching overhead of user thread to kernel thread? What kinds of overhead will there be?
As of I know,
1) Context switching is the switching of the CPU from one process or thread to another and only happens in kernel mode.
2) The reason for calling mode switch (instead of context switching) is that the currently executing process does NOT change during a mode switch.
3) Process context switching costs more than Thread context switching.