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 ...

Get JavaSpaces™ Principles, Patterns, and Practice 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.