Don’t Forget Synchronization
In this lesson, you will learn why shared data can result in a synchronization problem in concurrent programs and how it is resolved via locking.
Given that the caches do all of this work to provide coherence, do programs (or the OS itself) have to worry about anything when they access shared data? The answer, unfortunately, is yes, and is documented in great detail in the second piece of this course on the topic of concurrency. While we won’t get into the details here, we’ll sketch/review some of the basic ideas here (assuming you’re familiar with concurrency).
When accessing (and in particular, updating) shared data items or structures across CPUs, mutual ...