Big-block synchronization mechanisms
Big computer applications are formed by different components that work together to get the desired functionality. Those components have to synchronize and communicate between them. In Chapter 9, Diving into Concurrent Data Structures and Synchronization Utilities, you learned that you can use different Java classes to synchronize tasks and communicate between them. But this task organization is more complicated when the components you want to synchronize are concurrent systems too that can use different mechanisms to implement their concurrency. For example, you have a component in an application that uses the Fork/Join framework to generate their results that are used by other tasks synchronized using the Phaser
class.
In these cases, you can use the following two mechanisms to synchronize and communicate those components:
Shared memory: The systems share a data structure to pass information between them.
Message passing: One of the systems sends a message...