TRT
Sign in

Advanced · Module 6

Processes, Signals, and Inter-Process Communication

Create isolated process address spaces with fork and execve, handle asynchronous signals safely, and coordinate execution using pipes, shared memory, semaphores, and Unix sockets.

Start the modulePro10 lessons · about 159 minutes

Operating system kernels manage multitasking by isolating programs into independent virtual memory address spaces called processes. This module explores how Unix systems spawn child processes, replace program text with new executables, intercept asynchronous interrupts via signals, and synchronize distributed tasks through inter-process communication (IPC) channels. Mastering these facilities allows you to architect multi-process daemons, robust worker pools, and low-latency local client-server systems.

  1. 1Process Lifecycle: fork, execve, and Address Space DuplicationPro — members onlySpawn isolated process address spaces with fork, trace Copy-on-Write memory mechanics, replace process images using execve, and control descriptor inheritance.16 min
  2. 2Process Synchronization: wait, waitpid, and Zombie ReapingPro — members onlySynchronize parent and child lifecycles, parse termination status codes, eliminate PID table exhaustion from zombie processes, and implement non-blocking reaping loops.16 min
  3. 3Signal Architecture and Delivery with sigactionPro — members onlyIntercept asynchronous software interrupts with sigaction, inspect kernel signal delivery frames, configure SA_RESTART and SA_SIGINFO, and eliminate signal race conditions.16 min
  4. 4Signal Masks, Pending Signals, and Async-Signal SafetyPro — members onlyBlock and unblock signals using sigset_t bitmasks, trace signal coalescence in pending bitmaps, eliminate pause race conditions with sigsuspend, and guarantee async-signal safety.16 min
  5. 5Inter-Process Streams: Anonymous Pipes and Named FIFOsPro — members onlyStream byte payloads between processes using anonymous pipes and named FIFOs, manage descriptor closure hygiene to signal EOF, and prevent SIGPIPE faults.16 min
  6. 6POSIX Shared Memory: shm_open and Mapped RegionsPro — members onlyEstablish high-speed zero-copy IPC channels using shm_open, size shared memory segments with ftruncate, map pages with mmap, and clean up with shm_unlink.16 min
  7. 7Process Synchronization with POSIX SemaphoresPro — members onlyCoordinate concurrent process execution with named and unnamed POSIX semaphores, implement cross-process mutual exclusion, and build bounded-buffer producer-consumer queues.16 min
  8. 8Unix Domain Sockets and File Descriptor PassingPro — members onlyEstablish bidirectional inter-process streams with AF_UNIX, pass live open file descriptors across process boundaries using sendmsg and SCM_RIGHTS, and authenticate peer credentials.16 min
  9. 9Process Environments, Resource Limits, and Daemon StartupPro — members onlyInspect inherited process state, pass configuration safely through the environment, enforce resource limits, and understand the lifecycle of long-running Unix services.16 min
  10. 10Terminals, Sessions, and Job ControlPro — members onlyUnderstand controlling terminals, process groups, and foreground signals well enough to build shell-like process supervision.15 min