Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Since the user process can run in kernel mode, does that mean when it is suspended in kernel mode, it will be rescheduled with the other kernel processes? And once it returns from the system call, it will be scheduled with the user processes? I am now confused as to when the process is rescheduled in kernel mode, how it runs in kernel mode when it's rescheduled? I have never read anything about the mode (user or kernel) being saved or set when context switching. Commented Sep 4, 2019 at 14:19
  • A context switch always happens in kernel mode. What happens next depends on the process state. If the process is running in user mode, the kernel will return to it, leaving kernel mode in the process. If the process was interrupted in kernel mode, the kernel will continue what it was doing. Commented Sep 4, 2019 at 16:37