Day 1: Mutual Exclusion and Memory Models

If you’ve done any concurrent programming at all, you’re probably already familiar with the concept of mutual exclusion—using locks to ensure that only one thread can access data at a time. And you’ll also be familiar with the ways in which mutual exclusion can go wrong, including race conditions and deadlocks (don’t worry if these terms mean nothing to you yet—we’ll cover them all very soon).

These are real problems, and we’ll spend plenty of time talking about them, but it turns out that there’s something even more basic you need to worry about when dealing with shared memory—the Memory Model. And if you think that race conditions and deadlocks can cause weird behavior, just wait ...

Get Seven Concurrency Models in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.