将锁偏向于一个线程,意味着该线程不需要释放锁的契约。
Biasing a lock to a thread means that the thread is not required to release the lease on the lock.
上图中第一个灰色段显示的是这些线程的对齐,它们可以使用偏向锁(注意所有地址都以00结尾)。
The first section in grey is reporting on the alignment of these thread object so that it may work with biased locking (note all addresses end with 00).
从最初的基准测试结果来看,偏向锁提供了最佳的性能,比其他的优化方式更有效。
The initial benchmarking results demonstrated that biased locking provided the best performance gain compared to any of the other available optimizations.
应用推荐