Practical System Programming in C++
Practical System Programming in C++
Summary:
Introduction
The book "Hands-On System Programming with C++" by Rian Quinn is a practical guide that immerses the reader in the world of low-level programming using modern C++ (C++17). Published in 2018 by Packt, the 566-page book covers key aspects of program interaction with the operating system: system calls, memory management, multithreading, inter-process communication (IPC), and working with file systems. Unlike academic textbooks, Quinn emphasizes real-world examples and practical exercises, making the book an ideal choice for developers looking to transition from writing application code to creating system components.
What the book is about
The book is divided into 14 chapters, each dedicated to a specific topic in system programming. The author starts with the basics: compilation, linking, working with g++ and CMake, and then moves on to more complex concepts. The main focus is on:
- POSIX system calls —
open,read,write,mmap,fork,execand their C++ wrappers. - Memory management — working with virtual memory, allocating large blocks, using
mmapfor file mapping. - Multithreading and synchronization — std::thread, mutexes, condition variables, atomic operations, as well as low-level primitives (futex).
- Inter-process communication — pipes, message queues, shared memory, semaphores, and sockets.
- Working with file systems — monitoring changes, asynchronous input/output (AIO, io_uring).
- Profiling and debugging — using
perf,strace,gdband built-in C++ tools.
Each chapter contains numerous code examples that can be immediately run and modified. The author also touches on security and code portability between Linux and Windows (via the WSL subsystem).
Who this book is for
The book is aimed at C++ developers with basic experience (knowledge of syntax, STL, classes). It will be useful for:
- Programmers transitioning from the application level (web, databases) to system programming.
- Developers of embedded systems and drivers.
- Performance and optimization specialists.
- Senior students studying operating systems.
If you are familiar with C++ at the level of writing console utilities but want to understand how processes, threads, and memory work "under the hood" — this book will be an excellent bridge between theory and practice.
What the reader will learn
After reading the book, you will be able to:
- Write efficient system utilities in C++ using system calls.
- Manage memory manually, avoiding leaks and fragmentation.
- Create multithreaded applications with correct synchronization.
- Organize data exchange between processes via shared memory, pipes, and sockets.
- Work with asynchronous input/output to improve performance.
- Profile and debug system code using standard Linux tools.
- Understand the internal structure of the operating system (Linux) and its API.
Strengths
The book stands out from other publications on system programming due to:
- Practical focus — every theoretical block is supported by code that can be downloaded from GitHub.
- Modern C++ — the author actively uses C++17 features (std::optional, std::variant, structured bindings), showing how to write safe and readable code
Recommendations
Starting to Program in Python
C# (.NET) and Docker: Application Containerization
GraphQL on C# (.NET): Complete Guide to Building Modern APIs
Clean Code in Java: A Practical Guide to Writing Readable and Maintainable Code
Web Development in Go (Golang): From Basics to Deployment
Enterprise Integration Patterns