Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 706 Bytes

File metadata and controls

22 lines (16 loc) · 706 Bytes

Review

  • Race Conditions

  • Memory Visibility

    • CPU caches
    • instruction reordering
    • double-lock pattern
  • Deadlock

    • lock ordering
    • alien methods

Self study/Discussion

  • Check out William Pugh’s Java memory model website.

  • Acquaint yourself with the JSR 133 (Java memory model) FAQ.

  • What guarantees does the Java memory model make regarding initializa- tion safety?

  • Is it always necessary to use locks to safely publish objects between threads?

  • What is the double-checked locking anti-pattern? Why is it an anti-pattern?