Linux userspace / kernel ABI

System Programming

Instead of restating API lists, this series follows buildable C programs through libc and syscalls to the kernel objects they change. It treats short returns, EINTR, asynchronous events, file-descriptor lifetimes, and other real failure conditions alongside the normal path.

Topics
39
Code
buildable C examples
Kernel
Linux 6.18.37 LTS
Method
code / object / failure path

Syscall / ELF

Traces how a C function call passes through the syscall instruction and ELF loader to reach the kernel ABI.

Process

Covers the sequence in which processes are created, replaced, and reaped, including fork, execve, wait, sessions, and service lifetimes.

File Descriptor / I/O

Examines open file descriptions, short I/O, pathname resolution, metadata changes, and ioctl together with file-descriptor lifetimes.

Virtual Memory

Distinguishes the address space, mmap, page faults, protection, and the point where an allocator meets actual pages.

Signal / Event / IPC

Collects asynchronous notifications in file-descriptor-based event loops and explains how bytes and permissions move between processes.

39

POSIX message queues: names, messages and lifetimes

Opening a queue does not mean creating a new one. Check creation attributes, priorities, receive buffers, waiting and name removal separately.

21

Where do interrupts, events, and signals originate?

Separates hardware IRQs, kernel state changes and wakeups, and process signals into distinct boundaries, then traces signal generation from kill, faults, timers, TTY input, and child termination.

22

signal mask, pending, delivery

Connects signal generation, pending queues, thread selection, masks, handler frames, and sigreturn in one flow, and summarizes handler-safety rules.

23

epoll readiness and edge-triggered loops

Demonstrates in code that readiness is the possibility of progress on the next nonblocking I/O operation, not completion notification, and applies the EPOLLET drain rule.

24

timerfd and eventfd

Represents timer expiration and cross-thread wakeups as 8-byte counter fds integrated into an epoll loop, then examines counter accumulation and overflow rules.

25

Unix sockets and SCM_RIGHTS

Explains, control message by control message, how a Unix domain socket installs not just bytes but an open file reference in another process's fd table.

26

POSIX shared memory and process-shared semaphores

Uses shm_open to attach a name to an inode-like object and coordinates data publication with a semaphore inside MAP_SHARED memory.

27

inotify and directory change tracking

Separates watch-descriptor and pathname lifetimes, and treats rename cookies, queue overflow, and recursive-watch gaps as a recoverable protocol.

Thread / Synchronization

Explains pthread objects, mutexes, condition variables, futexes, and C atomic memory order in terms of the data actually shared.

Socket

Follows the failure points of network programs from socket creation through nonblocking connect, stream framing, UDP, and name resolution.

Observe / Harden

Uses io_uring, seccomp, /proc, strace, and perf to shorten, constrain, and observe execution paths.