Consider the following events that happen during a context switch of process $P$ to (user mode of) process $Q$, triggered by a timer interrupt that occurred when $P$ was executing in a Unix like operating system. Arrange the events in the chronological order, starting from the earliest to the latest.
(A) The CPU program counter moves from the kernel address space of $P$ to the kernel address space of $Q$.
(B) The CPU executing process $P$ moves from user mode to kernel mode.
(C) The CPU stack pointer moves from the kernel stack of $P$ to the kernel stack of $Q$.
(D) The CPU program counter moves from the kernel address space of $Q$ to the user address space of $Q$
(E) The OS scheduler code is invoked.