task_struct
The kernel's unit of scheduling — not the two hundred fields, the twelve that matter, grouped by concern.
Threads are tasks
Linux has no separate thread object: a thread is a task that shares its address space, files, and signal
fork and COW
fork()'s contract sounds absurd the moment you say it out loud: duplicate this entire process,
exec and ELF
exec() is the complement to fork(), in the precise sense of doing the
Address space
Every address a program uses is invented. 0x400000 in one process and 0x400000 in another refer to
Credentials
A task's identity is not one number. There are four user IDs, four group IDs, a supplementary group
States and wait queues
"Running" is the rarest state a task is in. Look at any real machine, at any moment, and almost every
Exit and zombies
A process's exit status has to survive the process, because POSIX gives the parent the right to ask
Signals
Signals are the oldest asynchronous notification mechanism in UNIX — older than threads, older than
Pipes and UNIX sockets
Every operating systems course spends a lecture on System V message queues and semaphores, and almost no
/proc
/proc is not a directory of files. Nothing under it is stored anywhere, and nothing you cat was
Lab: a process is born
One event, three instruments, and the point of running all three is not redundancy — it is