System Calls & Talking Between Processes
Every interesting thing a program does — print, read a file, open a connection — is a polite request to the kernel. Watch the requests and any program's behavior becomes transparent.
A system call is a controlled jump into the kernel: the program puts a syscall number and arguments in registers and executes a special instruction; the CPU switches to kernel mode at a fixed entry point; the kernel does the work, and returns a result (or an error). There are ~350 syscalls on Linux; a dozen — open, read, write, close, mmap, fork, execve, wait, socket, connect, accept, exit — cover most of what programs do.
Processes are isolated by design, so the OS provides official channels between them — inter-process communication (IPC). Pipes stream bytes from one process to another (every shell | is one). Sockets do the same across machines. Shared memory maps the same physical pages into two processes — fastest, and reintroduces every threading hazard. Signals poke; files rendezvous.
Containers (Docker) are not virtual machines — they're OS features: namespaces give a process group its own view of PIDs, filesystems, and network; cgroups cap its CPU and memory. Same kernel, walled gardens. A VM boots a whole second OS; a container is just processes wearing blinders — which is why containers start in milliseconds.