|About the Book|
This book provides an advanced guide to the issues of the parallel and multithreaded programming. It goes beyond the high-level design of the applications, into the details that are often overlooked but vital to make the programs work. The content is oriented towards the programming of the operating systems, servers and business applications. The parallel programming has three aspects to it: the theory of parallelism, a specific API you plan to use, and the details of how to make it all work together. Many books cover the first two aspects but at the moment this is the only book about the third one. This craft of parallel programming is not widely known, and because of this the parallel programming has gained the reputation of complexity. Surprisingly few programs and libraries do the multithreading quite right. This book leads the readers into the understanding of the craft, using many examples based on POSIX and Microsoft Windows APIs, with occasional Java or C#. Most of the algorithms discussed are general and may be implemented in any language. How to stop a multithreaded program correctly? Or how to stop only a single connection in a multi-user server? What if the program receives a signal? How are the scalable data structures built? What synchronization primitives are more appropriate in which usage patterns, and how are they related to each other? A whole lot of questions about the queues and topologies built with them. When are the fashionable paradigms of lock-free synchronization, transactional memory and actors hot and when not? How to multiplex with threads and without them? This book answers all these questions and more.