也是老东西了…以前没有整理记录的习惯,哎。

  1. Early research utilized property that mostsynchronization in Java language is uncontended.
    • not only uncontended,but unshared
    • Most objects locked / unlocked by exactly one thread inthe object’s lifetime
  2. Avoid creation of mutex/condvar per Java object. ——不是完全免费的
  3. Compare-and-swap / compare and exchange
  4. “Inflate” to full heavyweight monitor if contention detected
  5. Previous:
    • First thread locking the object reserves the lock with an atomic operation
      • Subsequent locks / unlocks by that thread use no atomic operations
      • Recursion count in object header detects IllegalMonitorStateException
      • Using non-atomic stores
    • If another thread locks the object, relativelyexpensive unreservation required
      • Involves sending signal to reservation owner thread
      • Ensures reservation owner thread not performing concurrent non-atomic stores
  6. New
    • Store-Free Biased Locking
    • Bulk rebiasing and bulk revocation
    • Epoch-based bulk rebiasing