Course Outline

Concurrency Challenges and Issues

  • Hardware Platform Limitations - Hardware Threads, Pipelines, Cache Coherence
  • Fundamental Concepts Related to Multithreaded Programming (Correctness of Multithreaded Programs, Liveness, Starvation, Deadlock, Race Conditions, Atomicity, Consistency Models, Flynn’s Taxonomy)
  • Concurrency Mechanisms Available in C++ (Multithreading and Multiprocessing)
  • Standard Library Implementation - Elements from C++14 to the Present Day (C++2a)
  • Boost Implementation Availability - Differences Compared to the Standard Library

Processes and Threads

  • Multiprocess vs. Multithreaded Applications
  • Operating System and Threads (Brief Overview of Available Implementations)
  • Process and Thread Synchronization Mechanisms
  • Structural Implementation of Synchronization
  • Specifics of Multithreading Implementation in an Object-Oriented Approach (Role of the RAII Pattern)

C++ Memory Model

  • Objects and Memory Locations
  • Operation Sequencing and Enforcement
  • Relations: Synchronization, Precedence, Operation Ordering for Atomic Actions, Release Sequences
  • Memory Barriers
  • Atomic Operations

Thread Management in C++14 and Later Standards

  • The std::thread Class and Thread Launching
  • Thread Identification
  • Attaching and Detaching Threads
  • Threads and Standard Containers
  • Exception Handling in C++14 Threads

Mutual Exclusion and Critical Sections

  • Simple Mutual Exclusion Rules
  • Types of Available Locking 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 Lock Management (std::lock_guard, std::unique_lock)
  • Deferred and Recursive Locks (std::lock)
  • Lock Ownership and Shared Ownership of Locks and Threads
  • The Reader-Writer Problem
  • One-Time Initialization
  • Thread Local (Private) Memory (std::thread_local)

Locks and Thread Synchronization

  • Semaphore Operations
  • Recursive Locks
  • Locks with Defined Locking Levels
  • Decision Variables and Cooperation with Locks
  • Implementation of Active and Passive Barriers (Idle Waits, Busy Waits)
  • Resuming Thread Activity
  • Thread Communication (Actor Model and CSP)

Asynchronous Tasks

  • Asynchronous Events and Their Handling
  • Futures
  • Promises
  • Prepared Tasks (packaged_task)

Atomic Types

  • Standard Atomic Types
  • Universal Atomic Flag (std::atomic_flag)
  • The std::atomic Class Template and Its Specializations
  • Utility Functions for std::atomic Types

Specifics of Designing Multithreaded APIs

  • Designing Structures with Locks - Coarse-Grained and Fine-Grained Locks
  • Concurrency Performance - Estimation and Measurement Techniques
  • Data Partitioning
  • Scalability of Solutions
  • Error Handling and Exception Management in Application Architecture

Testing and Debugging Multithreaded Applications

  • Code Reviews for Multithreading Operations
  • Specifics of Testing Multithreaded Applications
  • Unit Tests
  • Increasing the Likelihood of Fault Conditions for Testing
  • Formal Methods for Testing Multithreaded Applications
  • Multithreaded Application Architecture Patterns and Testing/Debugging (Overview)

Advanced Thread Management

  • Dependent Threads (Sagas Pattern)
  • Avoiding Data Access Contention
  • Controlled Thread Termination and Interruption
  • Interrupting Blocking Calls
  • Interruption Handling
  • Task Stealing
  • Interrupting Tasks During Application Shutdown

Multithreading Design Patterns

  • Scope of Pattern Applications
  • Thread Pool
  • Active Object Pattern
  • Thread-Safe Queue
  • Producer-Consumer Pattern
  • Monitor Pattern
  • Multithreading Safety of GoF Patterns

Requirements

  • Ability to use software development tools in C++ in the GNU/Linux and/or MS Windows environment
  • Advanced and intermediate knowledge of programming concepts in C++ (both procedural and object-oriented paradigms)
  • Understanding of generic code creation (templates)
 28 Hours

Number of participants


Price Per Participant (Exc. Tax)

Testimonials (4)

Provisional Courses

Related Categories