trap instruction
Sets kernel mode,integrated with the system call in C code
Calling kernel level from user level
system call interface
Handles inter-process communication, scheduling and memory management
Process Control System
Handles hardware from kernel level
Hardware Control
System call with TWO return values
parent gets PID of child, child gets 0
The stacks of a Unix process
One for user mode
One for system calls in kernel mode
Memory layout: Text
read-only machine code
4 facts after a fork
wait [n]
exec
Change program in the current process, keeping the old PID
critical resource
to be deterministic: only one process or thread at a time
static - on variables declared outside function (and functions themselves)
not visible outside the declaring file
static - on variables declared inside functions
keeping value from one function execution to the next.