If
- CPU has mode (privilege level) (Added because not all processors have privilege levels according to here)
- CPU is multi-core (CISC / x86-64 instruction set)
- scheduling is round robin scheduling
- thread is kernel managed thread
- OS is windows if necessary
I want to know simplified core execution flow in the point of thread context switch and CPU mode switch per time slice.
My understanding is as follows. Please correct me if I'm wrong.
In case of the thread is kernel managed user mode thread not involving interrupt, or anything that requires kernel mode,
- The thread context switch occurs.
- The core executing thread switches to kernel mode because context switch can only occur in kernel mode according to here, here and here unless the thread is user managed thread.
- The core executing thread switches to user mode.
- The core executes sequence of instructions located in user space.
- Time slice expires.
- Repeat 1.
Closest related diagram I could find is below.

Even a little clue to answer will be sincerely appreciated.