Another way to avoid synchronization issues is to allocate a large chunk of global memory and break it into smaller slots, where each slot is to be used by one thread for logging.
This means that in the absence of synchronization, memory operations can appear to happen in different orders from the perspective of different threads.
这意味着在缺乏同步的情况下,从不同的线程角度来看,内存的操作是以不同的次序发生的。
3
But synchronization also has another aspect: it enforces certain memory visibility rules as specified by the JMM.