Exceptions
hardware must detect special conditions: page fault, write to a read-only page, overflow, trace trap, odd address trap, privileged instruction trap, syscall...
must transfer control to handler within the O.S.
hardware must save state on fault (PC, etc) so that the faulting process can be restarted afterwards
modern operating systems use VM traps for many functions: debugging, distributed VM, garbage collection, copy-on-write...
exceptions are a performance optimization, i.e., conditions could be detected by inserting extra instructions in the code (at high cost)