[ SRE_ARENA ]
PROCESSES & IPC

Signals Are the Kernel's Text Messages. SIGKILL is a Bullet.

Visualization: 1. The Process Lifecycle & PID 1
DOWNLOADING CONCEPT: 1. THE PROCESS LIFECYCLE & PID 1...
PID 1 (The Ancestor)
  • ↳When the Linux kernel boots, the very first user-space process it spawns is init (or systemd).
  • ↳It gets Process ID 1.
  • ↳Every single process on a Linux system is a descendant of PID 1. If a parent dies leaving orphaned children, PID 1 adopts them.

↳Beyond PID 1, Linux creates all other processes using two distinct system calls: fork() and exec().

1. fork()
  • ↳The parent process calls fork() to create an exact duplicate of itself (the child).
  • ↳The child gets a new PID but inherits the parent's memory, environment variables, and open file descriptors.
  • ↳2. exec(): The child process calls exec() to replace its own memory space with a brand new program (e.g., executing /bin/ls).

↳This separation is powerful because it allows the shell (the parent) to set up pipelines, redirect I/O, or modify environment variables for the child *after* the fork() but *before* the exec().

▲ LIVE INCIDENTA container orchestrator reports 'Cannot create worker process: Resource temporarily unavailable'.
sre@arena:~/processes-ipc
sre@arena:~$ ps aux | awk '$8 ~ /Z/ {count++} END {print "Zombies:", count}'