Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.67 KB

java-thread-lock.md

File metadata and controls

29 lines (24 loc) · 1.67 KB

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