Exceptions Flashcards
what is an exception
circumstance outside of normal operation flow
what exceptions are handled by the OS
ones that originate from hardware
what examples of hardware exceptions are there
reset system calls emulator trap memory fault interrupt privilege violation
what happens upon an exception
system call to OS
raise privilege level of processor
execute trusted code to get more info and take action
what action would be taken upon a segmentation fault
exterminate the process
what action would be taken upon a page fault
corrective action e.g. fetch from memory
and resume
describe exact and inexact exceptions
exact- occur at a fixed position
inexact- occur at unknown position e.g. interrupt
what is an interrupt
caused by hardware to take control of the processor
what is an interrupt service routine
trusted piece of code that does not affect anything- no context switch or anything, just borrows the processor.
determines the interrupt source using hardware or software
quick and lightweight
urgent- latency kept low
when is enable/disabling interrupts especially imporant
during reset and boot
what is a system call
allows user applications to request a service
an exception
atomic action
give example system calls
access to file system
IPC
resource management
process management
access to private variables such as time
what is reset
this is the highest priority exception in any system.
used at start up to get the boot process going
describe the steps of a reset
set to highest privilege level
disable all interrupts
turn off memory mapping
disable cache
OS can then initialise before enabling each of these
how does an ISR determine the source of an interrupt (2 methods)
hardware- there is hardware that provides a vector to the relevant ISR when interrupting
software- a missive switch statement