n Virtually all OS code gets executed within the
context of a user process
n On Interrupts, Traps, System calls: the CPU
switch to kernel mode to execute OS routine
within the context of user process (mode switch)
n Control passes to process switching functions
(outside processes) only when needed