Question
-
Do you have to do anything else to ensure that this I/O privilege setting is saved and restored properly when you subsequently switch from one environment to another? Why?
Processor pushed
eflags
value to kernel stack at trap, the register will be restored byiret
when kernel try to rerun the environment. -
Think about what you would have to do in order to implement
exec
in user space, and be sure you understand why it is harder.Program
exec
need to replace image and setup frame while itself is running.