When a user process is interrupted or causes a processor exception, the x86 hardware switches the stack pointer to a kernel stack, before saving the current process state. Explain why. Anderson, Thomas. Operating Systems: Principles and Practice (Volume 1 of 4) . Recursive Books. Kindle Edition.

Respuesta :

Answer and Explanation

In x86, different stacks are used for kernel & user processes because of security purposes.

The kernel assigns the interrupt dispatch to a common kernel interrupt entry/exit

mechanism which saves pre-interrupt register state before summoning the registered handler(s).

When sending out an interrupt might launch a privilege and/or stack switch,

interrupts that occur while executing user process will switch to use the kernel stack in place at that point, without saving current state.

ACCESS MORE
EDU ACCESS