What happens if a user-mode program tries to execute a privileged instruction such as disabling interrupts?
Correct answer C. The hardware traps to the operating system instead of executing it
Privileged instructions are legal only in kernel mode. When a user program attempts one, the hardware does not execute it and raises a trap so the operating system can take control, usually terminating the program. The CPU never quietly promotes the program to kernel mode, because that would defeat the whole protection scheme that dual-mode operation provides.
Answer checked How we write and check questions
Discussion