lecture 14 Flashcards
Modes, Exceptions, and Processes
kernel mode
CPU mode –> handles system instructions on behalf of the user
*handles system calls and commands that configure hardware
user mode
CPU mode –> handles user instructions (code)
*cannot handle system calls/commands that configure hardware
why are there 2 modes?
to handle different kinds of instructions
when would kernel mode be used?
system calls, commands that configure hardware
when would user mode be used?
user program instructions (code)
types of synchronous exceptions
- trap (intentional system calls)
- fault (unintentional page faults)
- abort
trap
returns to next instruction
fault
page faults (recoverable)
protection faults (unrecoverable)
abort
illegal instruction, machine check (unrecoverable)
asynchronous exceptions
caused by an event external to the CPU
types of asynchronous exceptions
- timer interrupter
- I/O interrupt from external device