4.6. Summary
In this chapter, we've seen a range of useful techniques for achieving synchronization in space-based programs. We've implemented and used semaphores to control access to a set of limited resources, and also to avoid deadlock. We've designed a turn-taking scheme that ensures fair access to a collection of resources and prevents starvation. We've seen one way—barriers—of allowing distributed computations to occur in distinct phases. Beyond that, we've explored a more advanced synchronization example that enforces rules about what kinds of access (reading or writing) there can be to a resource at a given time, and that also ensures fair access to the resource. In each case, we designed one or more distributed data structures to achieve ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access