See how the potential for a data race occurs whenever two or more concurrent threads access the same memory location and at least one of the threads is writing to that location. Even simple operations like incrementing a variable consist of multiple instruction steps under the hood.
- One of the main challenges of writing concurrent programs … is identifying the possible dependencies between threads … to make sure they don't interfere with each other … and cause problems. … Data races are a common problem that can occur … when two or more threads are concurrently accessing … the same location in memory, … and at least one of those threads … is writing to that location to modify its value. … Fortunately, you can protect your program … against data races by using synchronization techniques, … which we'll show you later, … but to eventually use those techniques, … you'll first need to know how to recognize the data race. … Olivia and I are two concurrent threads … working together to figure out … what we need to buy from the grocery store. … I'll take inventory of the pantry, … and when I see that we're running low on something, … I'll add more of that item to our shared shopping list. … - And while Barron does that, … I'll look through my recipe book, … and I'll add ingredients to our shopping list …
- Parallel computing architectures
- Shared vs. distributed memory
- Thread vs. process
- Execution scheduling
- The thread lifecycle in C++
- Mutual exclusion
- Locking in recursive and shared mutexes
- Acquiring a lock on a mutex with a try lock
- Resolving deadlock and livelock conditions
Skill Level Advanced
1. Parallel Computing Hardware
2. Threads and Processes
3. Mutual Exclusion
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.