educative.io

Educative

Quiz question 4

I can see all the options in lesson’s description of the process (image) but some of them are wrong ib the quiz - why?

Hi there,
I agree these all actions will be performed in Context Switching but specifically, ‘switch()’ routine will perform that actions which are highlighted green.

Kindly read these statements in the lesson, “it calls the switch() routine, which carefully saves current register values (into the process structure of A), restores the registers of Process B (from its process structure entry), and then switches contexts , specifically by changing the stack pointer to use B’s kernel stack (and not A’s)”.