Interprocess Communications in Linux: The Nooks and Crannies
Interprocess Communications in Linux explains exactly how to use Linux processes and interprocess communications to build robust, high-performance systems. Coverage includes: named/unnamed pipes, message queues, semaphores, shared memory, RPC and the rpcgen compiler, sockets-based communication, the /proc file system, LinuxThreads POSIX support, multithreading, and much more. Includes detailed exercises, plus dozens of downloadable program examples compiled with GNU C/C++ 2.96 & 3.2 and tested with Red Hat Linux 7.3 & 8.0.
Why Read This Book
You should read this book if you need a practical, Linux-centric deep dive into interprocess communication and concurrency: it shows the system calls, APIs, and real code examples that get IPC right in production. You will gain hands-on techniques for building robust, high-performance communication between processes and threads on Linux systems.
Who Will Benefit
Embedded Linux developers, firmware engineers, and systems programmers who build multi-process or multi-threaded applications and need to understand Linux IPC internals and practical APIs.
Level: Intermediate — Prerequisites: Working knowledge of C programming, basic Linux command line and development tools, and familiarity with processes/threads and basic OS concepts.
Key Takeaways
- Implement and use unnamed and named pipes (FIFOs) correctly for process communication.
- Use System V and POSIX message queues, semaphores, and shared memory for efficient IPC.
- Build socket-based communication (UNIX domain and TCP/IP) and understand when to choose each.
- Create and use RPC services with rpcgen and understand RPC trade-offs.
- Write and debug multithreaded programs using LinuxThreads/pthreads and handle synchronization safely.
- Inspect and leverage the /proc filesystem and standard tools to observe and debug IPC and process state.
Topics Covered
- Introduction to IPC and Linux process model
- Signals and basic process control
- Pipes and FIFOs (unnamed and named)
- System V IPC: message queues, semaphores, shared memory
- POSIX IPC: message queues, semaphores, shared memory
- Sockets: UNIX domain and TCP/IP basics
- Advanced socket programming and network considerations
- RPC and the rpcgen tool
- Threads, LinuxThreads and pthreads
- Synchronization primitives and concurrency patterns
- The /proc filesystem and process inspection
- Performance, debugging and common pitfalls
- Exercises, annotated examples and appendices (API references)
Languages, Platforms & Tools
How It Compares
Overlaps with Stevens' Advanced Programming in the UNIX Environment but is more Linux-focused and example-driven; for a more modern system-level view see Robert Love's Linux System Programming which covers newer kernels and APIs.













