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.