- Delve into the basics of multithreading and concurrency and how you can enforce them
- Explore atomic operations to optimize code performance
- Apply concurrency to either allotted computing and GPGPU processing
Multithreaded purposes execute a number of threads in one processor atmosphere, permitting builders in achieving concurrency. This e-book will educate you the finer issues of multithreading and concurrency innovations and the way to use them successfully in C++.
Divided into 3 modules, we begin with a short advent to the basics of multithreading and concurrency suggestions. We then take an in-depth examine how those options paintings on the hardware-level in addition to how either working platforms and frameworks use those low-level functions.
In the following module, you'll know about the local multithreading and concurrency aid to be had in C++ because the 2011 revision, synchronization and conversation among threads, debugging concurrent C++ functions, and the easiest programming practices in C++.
In the ultimate module, you are going to find out about atomic operations earlier than relocating directly to follow concurrency to disbursed and GPGPU-based processing. the great insurance of crucial multithreading options ability it is possible for you to to successfully observe multithreading options whereas coding in C++.
What you are going to learn
- Deep dive into the main points of the how numerous working structures at the moment enforce multithreading
- Choose the simplest multithreading APIs while designing a brand new application
- Explore using mutexes, spin-locks, and different synchronization options and spot easy methods to effectively move information among threads
- Understand the extent of API help supplied by way of a number of C++ toolchains
- Resolve universal matters in multithreaded code and realize universal pitfalls utilizing instruments reminiscent of Memcheck, CacheGrind, DRD, Helgrind, and more
- Discover the character of atomic operations and know how they are often important in optimizing code
- Implement a multithreaded software in a allotted computing environment
- Design a C++-based GPGPU software that employs multithreading
About the Author
Maya Posch is a software program engineer by means of alternate and a self-professed electronics, robotics, and AI nut, operating her personal software program improvement corporation, Nyanko, along with her friend, Trevor Purdy, the place she works on numerous video game improvement initiatives and a few non-game tasks. except this, she does numerous freelance jobs for firms world wide. you could stopover at her LinkedIn profile for extra work-related details.
Aside from writing software program, she loves to play with equations and write novels, equivalent to her notable reimagining of the tale of the Nintendo vintage, Legend of Zelda: Ocarina of Time, and the survival-horror novel she lately all started, Viral wish. you could try out her Scribd profile for an entire directory of her writings.
Maya is usually attracted to biochemistry, robotics, and reverse-engineering of the human physique. to understand extra approximately her, stopover at her web publication, man made Human. If there is something she does not lack, it should be sheer ambition, it seems.
Table of Contents
- Revisiting multithreading
- Multithreading implementation at the processor and OS
- C++ Multithreading APIs
- Thread synchronization and communication
- Native C++ threads and primitives
- Debugging multi-threaded code
- Best Practices
- Atomic operations: operating with the hardware
- Multithreading with allotted computing
- Multithreading with GPGPU