Java Threads and Locks

Readings

Memory Reodering

Several mechanisms can produce the reordering. A Just-In-Time(JIT) compiler in a Java Virtual Machine implementation may rearrange code, or the processor. In addition, the memory hierarchy of the architecture on which a Java Virtual Machine implementation is run may make it appear as if code is being reordered.

  • Compiler can reorder statements
  • Processor can reorder them
  • On multi-processor, values not synchronized to global memory
  • The memeory model is designed to allow aggressive optimization
  • Good for performance
Copyright © lowzj all right reserved,powered by GitbookLast Modified: 2023-03-12 01:06

results matching ""

    No results matching ""