The kernel exists to service system calls System calls are usually invisible to applications The standard C library masks syscalls as functions The Linux implementation is not directly posix-compliant The calling convention for system calls is like this: Syscall arguments are stored in registers This applies to archs where args are passed on the stack, too On return, small negative value (-4095..-1) represent -errno, otherwise success Libc wraps this to the Posix API (-1 on error, errno set accordingly) To enter kernel space a special machine instruction is issued x86: "int 0x80" (or the newer "sysenter", from PIII onwards) ARM: "swi" a.k.a. "svc" (with different arguments in OABI and EABI) System calls with many arguments use a different convention We'll ignore such system calls here