Course Outline

    Challenges and problems of concurrency Hardware limitations of platforms - hardware threads, pipelines, cache cohesion Elementary concepts related to multithreaded programming (multithreaded program correctness, lifetime, starvation, deadlock, race, atomicity, consistency models, Flynn's taxonomy) Implementation mechanisms available in C++ multithreading and multiprocessing Standard library implementation - elements from C++14 to the present day (C++2a) Implementation available in Boost - differences from the standard library Processes and threads Multiprocessing vs. multithreading applications Operating system and threads (a brief overview of available implementations) Mechanisms for process and thread synchronization Structural implementation of synchronization Specificity of multithreading implementation in the object-oriented approach (the role of the RAII pattern) Memory model in C++ Objects and memory locations Scheduling and forcing operations Relationships: synchronization, precedence, ordering of operations in favor of atomic activities, release sequences Barriers Atomic operations C++14 and later thread management std::thread class and starting threads Thread identification Attaching and detaching a thread Threads vs. standard containers Exception handling in C++14 threads Mutual exclusion and critical sections Simple mutual exclusion rules Concepts ( types) of available lock objects Quick introduction to time handling in C++14 (chrono library) Classes std::mutex, std::timed_mutex, std::shared_mutex and derivatives RAII pattern in handling locks (std::lock_guard, std:: unique_lock) Dependent and deferred locks (std::lock) Ownership and co-ownership of locks and threads Reader-writer problem Single initialization Thread local (private) memory std::thread_local) Locks and thread synchronization Operations on semaphores Recursive locks Locks with blocking level definition Decision variables and cooperation with the lock Implementation of active and passive barriers (Idle Waits, Busy Waits) Resumption of threads Communication between threads (Actor and CSP models) ) Asynchronous tasks Asynchronous events and their handling Futures Promises Packaged_tasks Atomic types Standard atomic types Universal atomic flag (std::atomic_flag) Template class std::atomic <T> and its specializations Tool functions (free) of std::atomic types Specificity of multi-threaded API design Designing structures with locks - coarse and fine-grained locks Efficiency of concurrent code - estimation and measurement techniques Data partitioning Solution scalability Handling of errors and exceptions in Application architecture Testing and debugging multi-threaded applications Code reviews for multi-threaded operations The specificity of testing multi-threaded applications Unit testing Increasing the probability of failures in favor of testing Formal methods for testing multi-threaded applications Architecture patterns of multi-threaded applications and testing and debugging (overview) Advanced thread management Dependent threads (Sagi pattern ) Avoidance of data contention Controlled thread stopping and termination Breaking of blocking calls Interrupt handling Task stealing Task termination at application termination Multithreading design patterns Types and purpose of multithreading patterns Patterns application Thread pool Thread Pool Active Object Pattern Thread Safe Queue Producer Consumer Pattern Monitor Pattern Multithreaded Security Patterns GoF

Requirements

    Ability to use tools for building software in C++ in the GNU/Linux and/or MS Windows environment Knowledge of programming issues in C++ (procedural and object-oriented paradigm) at an advanced and intermediate level Knowledge of general code creation (templates)
 28 Hours

Number of participants



Price per participant

Testimonials (3)

Related Courses

Using C++ in Embedded Systems - Applying C++11/C++14

21 Hours

Related Categories