Modern C++ Concurrency in Depth
3.9 (647 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
4,067 students enrolled

Modern C++ Concurrency in Depth

in depth discussion on modern c++ concurrency features including memory model, lock free data structure, thread pools
3.9 (647 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
4,068 students enrolled
Created by Kasun Liyanage
Last updated 2/2019
English
English [Auto-generated]
Current price: $48.99 Original price: $69.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 5.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Build lock free and lock based thread safe data structures and algorithms which harvest the power of modern day multi-core processors
Requirements
  • basic of c++ programming , some knowledge about data structures and algorithms would be helpful
Description

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 above all i liked to categorized 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. Proper memory reclaim mechanism for lock free data structures.

6. Design aspects of concurrent code.

7. In depth discussion on thread pools

Who this course is for:
  • Anyone who wants to widen you skills with c++ programming.
Course content
Expand all 67 lectures 05:35:20
+ Thread management guide
15 lectures 01:04:15

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

Quiz : Parallel programming in general
01:04
Programming exercise 1 : Launching the threads
00:55
Joinability of threads
04:17
Join and detach functions
04:11
How to handle join, in exception scenarios
05:30
Programming exercise 2 : Trivial sale a ship model
02:03
How to pass parameters to a thread
04:07
Problematic situations may arise when passing parameters to a thread
03:19
Transferring ownership of a thread
03:24
Some useful operations on thread
05:10
Programming excersice 3 : Sail a ship with work queues
01:59
Parallel accumulate - algorithm explanation
03:39
Parallel accumulate algorithm implementation
08:30
Thread management
4 questions
+ Thread safe access to shared data and locking mechanisms
9 lectures 38:33
mutexes
05:50
Things to remember when using mutexes
02:46
Thread safe stack implementation : introduction to stack
04:46
Thread safe stack implementation : implementation
06:26
Thread safe stack implementation : race condition inherit from the interface
05:33
Dead locks
04:36
unique locks
02:41
Mutex and locks
5 questions
+ Communication between thread using condition variables and futures
11 lectures 46:12
introduction to condition variables
04:36
Details about condition variables
04:14
Thread safe queue implementation : introduction to queue data structure
04:58
Thread safe queue implementation : implementation
05:11
introduction to futures and async tasks
04:28
async tasks detailed discussion
04:55
Parallel accumulate algorithm implementation with async task
03:55
Introduction to package_task
03:42
Communication between threads using std::promises
03:14
Retrieving exception using std::futures
03:00
std::shared_futures
03:59
+ Lock based thread safe data structures and algorithm implementation
4 lectures 19:50
introduction to lock based thread safe data structures and algorithms
04:00
queue data structure implementation using linked list data structure
06:19
thread safe queue implementation
02:43
parallel quick sort algorithm implementation
06:48
+ C++ memory model and atomic operations
17 lectures 01:08:33
Introduction to atomic operations
03:16
Functionality of std::atomic_flag
03:56
Functionality of std::atomic_bool
05:48
Explanation of compare_exchange functions
04:42
atomic pointers
06:24
General discussion on atomic types
02:08
Important relationships related to atomic operations between threads
03:37
Introduction to memory ordering options
02:22
Discussion on memory_order_seq_cst
05:34
Introduction to instruction reordering
04:05
Discussion on memory_order_relaxed
04:31
Discussion on memory_order_acquire and memory_order_release
04:41
Important aspects of memory_order_acquire and memory_order_release
02:08
Concept of transitive synchronization
02:38
Discussion on memory_order_consume
02:51
Concept of release sequence
05:27
Implementation of spin lock mutex
04:25
+ Lock free data structures and algorithms
6 lectures 58:02
Introduction and some terminology
02:06
Stack recap
07:18
Simple lock free thread safe stack
08:25
Stack memory reclaim mechanism using thread counting
14:25
Stack memory reclaim mechanism using hazard pointers
13:00
Stack memory reclaim mechanism using reference counting
12:48
+ Thread pools
5 lectures 39:55
Simple thread pool
08:49
Thread pool which allowed to wait on submitted tasks
06:19
Thread pool with waiting tasks
10:50
Minimizing contention on work queue
05:28
Thread pool with work stealing
08:29