We may earn an affiliate commission when you visit our partners.
Course image
Udemy logo

Modern C++ Concurrency in Depth ( C++17/20)

Kasun Liyanage

C++ programming language can be categorized under many topics. Some say its a general purpose programming language, some say its a object oriented version of C. But I liked to categorized it under system programming language. One characteristic of any system programming language including C++ is that language should be able to execute faster compare to other languages like java etc. 

Read more

C++ programming language can be categorized under many topics. Some say its a general purpose programming language, some say its a object oriented version of C. But I liked to categorized it under system programming language. One characteristic of any system programming language including C++ is that language should be able to execute faster compare to other languages like java etc. 

C++ paradigm took sharp turn with the introduction of C++11 standards. The most notable difference with previous version is the introduction of new memory model. Memory model is the key part of any language, and the performance of all the functionalities depends on that language memory model. With new c++ memory model, we can exploit tremendous power of  modern multi core processors. 

Programming a proper C++ code with better memory reclaim mechanism is tough task. But if we want to code thread safe code which can harvest underline processors true power is much more difficult task. In this course we will have in depth discussion on  C++ concurrency features including memory model. We will implements thread safe data structures and algorithms, both lock based manner and lock free manner. Proper lock free implementations of data structures and algorithms will provide unprecedented performance output. Let me listed down key aspects we cover in this course below.

1.Basics of C++ concurrency(threads, mutex, package_task, future ,async, promise)

2.Lock based thread safe implementation of data structures and algorithms.

3.C++ memory model.

4.Lock free implementation of data structures and algorithms.

5.C++20 concurrency features.

5. Proper memory reclaim mechanism for lock free data structures.

6. Design aspects of concurrent code.

7. In depth discussion on thread pools.

8. Bonus section on CUDA programming with C and C++.

Enroll now

What's inside

Learning objectives

  • Learn concurrent programming in c++ including feature in c++17/20 standards.
  • You will learn how to implement useful concurrent data structures and algorithms using latest c++ features.

Syllabus

Thread management
Setting up the environment for the course
Introduction to parallel computing

In this quiz we are going to explore parallel programming in general

Read more
Uses of parallel programming.
How to launch a thread
Programming exercise 1 : Launching the threads
Joinability of threads
Join and detach functions
How to handle join, in exception scenarios
Programming exercise 2 : Trivial sale a ship model
How to pass parameters to a thread
Problematic situations may arise when passing parameters to a thread
Transferring ownership of a thread
Some useful operations on thread
Programming excersice 3 : Sail a ship with work queues
Parallel accumulate - algorithm explanation
Parallel accumulate algorithm implementation
Thread local storage
Debugging a application in Visual studio
How to write thread safe code using locks
Introduction to locking mechanisms
Concept of invarient
mutexes
Things to remember when using mutexes
Thread safe stack implementation : introduction to stack
Thread safe stack implementation : implementation
Thread safe stack implementation : race condition inherit from the interface
Dead locks
unique locks
Mutex and locks
How to communication between threads
introduction to condition variables
Details about condition variables
Thread safe queue implementation : introduction to queue data structure
Thread safe queue implementation : implementation
introduction to futures and async tasks
async tasks detailed discussion
Parallel accumulate algorithm implementation with async task
Introduction to package_task
Communication between threads using std::promises
Retrieving exception using std::futures
std::shared_futures
How to implement lock based thread safe data structures and algorithm
introduction to lock based thread safe data structures and algorithms
queue data structure implementation using linked list data structure
thread safe queue implementation
Parallel STL introduction
parallel quick sort algorithm implementation
parallel for each implementation
parallel find algorithm implementation with package task
parallel find algorithm implementation with async
Partial sum algorithm introduction
Partial sum algorithm parallel implementation
Introduction to Matrix
Parallel Matrix multiplication
Parallel matrix transpose
Factors affecting the performance of concurrent code
C++20 Concurrency features
Jthread : Introduction
Jthread : Our own version implementation
C++ coroutines : Introduction
C++ coroutines : resume functions
C++ coroutines : Generators
C++ Barriers
in depth discussion on c++ memory model, memory ordering options with atomic opetations
Introduction to atomic operations
Functionality of std::atomic_flag
Functionality of std::atomic_bool
Explanation of compare_exchange functions
atomic pointers
General discussion on atomic types
Important relationships related to atomic operations between threads
Introduction to memory ordering options
Discussion on memory_order_seq_cst
Introduction to instruction reordering
Discussion on memory_order_relaxed
Discussion on memory_order_acquire and memory_order_release
Important aspects of memory_order_acquire and memory_order_release
Concept of transitive synchronization
Discussion on memory_order_consume
Concept of release sequence
Implementation of spin lock mutex
How to implement lock free data structures and algorithms with memory reclaim mechanisms
Introduction and some terminology
Stack recap
Simple lock free thread safe stack
Stack memory reclaim mechanism using thread counting
Stack memory reclaim mechanism using hazard pointers
Stack memory reclaim mechanism using reference counting
Learn how to construct working thread pool
Simple thread pool
Thread pool which allowed to wait on submitted tasks
Thread pool with waiting tasks
Minimizing contention on work queue
Thread pool with work stealing
Bonus section : Parallel programming in massively parallel devices with CUDA
Setting up the environment for CUDA
Elements of CUDA program

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Develops advanced C++ skills for writing multi-threaded and concurrent code, including memory models and race conditions
Examines modern C++ features, such as C++17/20 standards, for concurrency and parallelism
Taught by Kasun Liyanage, an expert in C++ concurrency
Provides hands-on practice with implementing thread-safe data structures and algorithms using both lock-based and lock-free approaches
Covers advanced topics such as C++20 concurrency features, CUDA programming, and thread pools

Save this course

Save Modern C++ Concurrency in Depth ( C++17/20) to your list so you can find it easily later:
Save

Activities

Coming soon We're preparing activities for Modern C++ Concurrency in Depth ( C++17/20). These are activities you can do either before, during, or after a course.

Career center

Learners who complete Modern C++ Concurrency in Depth ( C++17/20) will develop knowledge and skills that may be useful to these careers:
Software Engineer
Software Engineers design, develop, test, and maintain software systems. They use a variety of programming languages and tools to create software systems that are reliable, efficient, and meet user needs. This course helps build a foundation in advanced C++ concepts, including memory management and concurrency. These concepts are essential for developing high-performance software systems.
Computer Programmer
Computer Programmers translate software requirements into machine instructions using programming languages. They design, write, test, and maintain computer programs to meet user needs in a variety of areas, such as business, education, healthcare, and entertainment. This course helps build a foundation in advanced C++ concepts, including memory management and concurrency. These concepts are essential for developing high-performance software applications.
Software Developer
Software Developers write programs and applications for computers. They design, develop, test, and maintain software to meet user needs in a variety of areas, such as business, education, healthcare, and entertainment. This course helps build a foundation in advanced C++ concepts, including memory management and concurrency. These concepts are essential for developing high-performance software applications.
Mobile Application Developer
Mobile Application Developers design and develop mobile applications for smartphones and tablets. They use a variety of programming languages and tools to create mobile applications that are functional, visually appealing, and compatible with different mobile platforms. This course helps build a foundation in advanced C++ concepts, including memory management and concurrency. These concepts are essential for developing high-performance mobile applications.
Web Developer
Web Developers design and develop websites. They use a variety of programming languages and tools to create websites that are functional, visually appealing, and compatible with different devices. This course helps build a foundation in advanced C++ concepts, including memory management and concurrency. These concepts are essential for developing high-performance web applications.
Cloud Architect
Cloud Architects design, implement, and maintain cloud computing systems. They use a variety of programming languages and tools to create cloud computing systems that are reliable, efficient, and meet the needs of organizations. This course may be useful in developing the programming skills needed to work with cloud computing systems.
Systems Administrator
Systems Administrators install, configure, and maintain computer systems. They use a variety of programming languages and tools to create computer systems that are reliable, efficient, and meet the needs of organizations. This course may be useful in developing the programming skills needed to work with computer systems.
Computer Systems Analyst
Computer Systems Analysts design, develop, and implement computer systems. They use a variety of programming languages and tools to create computer systems that meet the needs of organizations. This course may be useful in developing the programming skills needed to work with computer systems.
Machine Learning Engineer
Machine Learning Engineers design, develop, and maintain machine learning models and algorithms. They use a variety of programming languages and tools to create machine learning models that can learn from data and make predictions or decisions. This course may be useful in developing the programming skills needed to work with machine learning models.
Database Administrator
Database Administrators design, implement, and maintain databases. They use a variety of programming languages and tools to create databases that are reliable, efficient, and meet the needs of organizations. This course may be useful in developing the programming skills needed to work with databases.
Network Administrator
Network Administrators design, implement, and maintain computer networks. They use a variety of programming languages and tools to create computer networks that are reliable, efficient, and meet the needs of organizations. This course may be useful in developing the programming skills needed to work with computer networks.
Information Security Analyst
Information Security Analysts design, implement, and maintain security systems to protect computer networks and data from unauthorized access. They use a variety of programming languages and tools to create security systems that are reliable, efficient, and meet the needs of organizations. This course may be useful in developing the programming skills needed to work with security systems.
Data Scientist
Data Scientists use scientific methods, processes, algorithms, and systems to extract knowledge and insights from data in various forms, both structured and unstructured. They develop and maintain analytical models and techniques to analyze data and provide insights for business decisions. This course may be useful in developing the programming skills needed to work with large datasets.
IT Manager
IT Managers plan, direct, and coordinate the activities of computer and information systems operations within an organization. They use a variety of programming languages and tools to manage computer and information systems. This course may be useful in developing the management skills needed to work with computer and information systems.
Technical Writer
Technical Writers create and maintain technical documentation for software and hardware products. They use a variety of programming languages and tools to create technical documentation that is clear, concise, and accurate. This course may be useful in developing the writing skills needed to work with technical documentation.

Reading list

We've selected nine books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Modern C++ Concurrency in Depth ( C++17/20).
Provides a comprehensive overview of C++ concurrency, covering topics such as threads, synchronization, and memory management. It valuable resource for anyone looking to learn more about C++ concurrency.
Provides practical advice on how to write effective modern C++ code. It covers a wide range of topics, including resource management, error handling, and performance optimization.
Provides a comprehensive overview of C++ templates. It covers topics such as template syntax, template metaprogramming, and template libraries.
Is the definitive reference on the C++ programming language. It covers all aspects of the language, from basic syntax to advanced topics such as templates and concurrency.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Modern C++ Concurrency in Depth ( C++17/20).
Learn Multithreading with Modern C++
Most relevant
Mastering Multithreading with Go
Most relevant
Python Programming - Multithreading, OOP, NumPy and Pandas
Most relevant
Working with Concurrency in Go (Golang)
Most relevant
Data Structures & Algorithms Using C++
Most relevant
Embedded Systems using C
Most relevant
C++ Standard Library: Sequential Containers
Most relevant
Garbage Collection Algorithms
Most relevant
C Programming: Pointers and Memory Management
Most relevant
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser