Consider the context switch of a CPU from the context of process P1 to that of process P2.
Consider the following two events in the chronological order of the events during the context switch:
- E1: The stack pointer shifts from pointing to the kernel stack of $\mathrm{P} 1$ to the kernel stack of $\mathrm{P} 2$;
- E2: The program counter shifts from pointing to an address in the memory allocated to $\mathrm{P} 1$ to an address in the memory allocated to P2.
Which of the following statements is/are true regarding the relative ordering of events E1 and E2?
- E1 occurs before E2.
- E2 occurs before E1.
- E1 and E2 occur simultaneously via an atomic hardware instruction.
- The relative ordering of E1 and E2 can vary from one context switch to the other.