I used to think that a process may switch from user mode to kernel mode by system call, after the kernel routine is done, it will check if there is any other process which has higher priority before return to user mode, if not, it will return to user mode directly. But Understanding the Linux Kernel, 3rd Edition 1.6.1. The Process/Kernel Model just confused me:
On a uniprocessor system, only one process is running at a time, and it may run either in User or in Kernel Mode. If it runs in Kernel Mode, the processor is executing some kernel routine. Figure 1-2 illustrates examples of transitions between User and Kernel Mode. Process 1 in User Mode issues a system call, after which the process switches to Kernel Mode, and the system call is serviced. Process 1 then resumes execution in User Mode until a timer interrupt occurs, and the scheduler is activated in Kernel Mode. A process switch takes place, and Process 2 starts its execution in User Mode until a hardware device raises an interrupt. As a consequence of the interrupt, Process 2 switches to Kernel Mode and services the interrupt.
![]()
The following description just don't make sense
Process 1 then resumes execution in User Mode until a timer interrupt occurs, and the scheduler is activated in Kernel Mode.
I think that returning to user mode have noting to do with interrupt and what does it mean by "scheduler is activated in Kernel Mode"?