Search code examples
operating-systemkernelinterruptuser-mode-linux

Do all traps require a switch from user mode to kernel mode?


I understand that kernel code is responsible for handling traps but are all traps handled by the kernel. Are there any traps that are handled in user mode? If so please provide an example.


Solution

  • A processor could have exceptions handled in user mode. The VAX explicitly allows the triggering of a user mode exception

    http://odl.sysworks.biz/disk$cddoc04sep11/decw$book/d32va118.p359.decw$book

    However, that is really not useful in practice. The VMS operating system is an example of when that uses the more than 2 processor modes for better protections.