✳flâneur — a map of the web's best reading

Chapter 5: Synchronization | 🗒️ Ben's Notes

notes.bencuan.me · saved by 1 readers

If two independent threads need to modify and read the same values, there could be multiple outputs depending on the order that the threads run in. How do we resolve this? Synchronization deals with coordination among threads and their shared data Mutual Exclusion: Only one thread does something at one time (excludes the other threads) Critical Section: code that only one thread can execute at once (consequence of mutual exclusion) Lock: An object that only one thread can hold at a time (provides mutual exclusion) A general type of lock that holds a non-negative integer. Can be used for mutual exclusion by setting it down, running critical section, then setting it up. Semaphores can also be used for signaling other threads: ...for more details! You might notice that some sections are empty (specifically, buffer management policies in Caching and most of Synchronization). Any contributions for these sections would be greatly appreciated!! Credits Ben Cuan... 6/8/2023 Made with Amethy

If two independent threads need to modify and read the same values, there could be multiple outputs depending on the order that the threads run in. How do we resolve this? Synchronization deals with coordination among threads and their shared data Mutual Exclusion: Only one thread does something at one time (excludes the other threads) Critical Section: code that only one thread can execute at once (consequence of mutual exclusion) Lock: An object that only one thread can hold at a time (provides mutual exclusion) A general type of lock that holds a non-negative integer. Can be used for mutual

Explore this link on the map →