Chapter 4. Synchronization

Never practice two vices at once.

—Tallulah Bankhead

Synchronization plays a crucial role in the design of any distributed application. Inevitably, to accomplish a common task or goal, the processes in a distributed system need to coordinate with one another and avoid stepping on each other's toes. For instance, distributed applications often need to mediate access to limited shared resources, ensure fair access to resources, or prevent a set of processes from coming to a standstill because of competing requests for the same resources.

Synchronizing distributed processes can be challenging. In a nondistributed system in which multiple threads are running, the operating system serves as a centralized manager of all ...

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.