首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Zz Java对象脑袋的一些信息和Biased锁

2012-09-25 
ZzJava对象头部的一些信息和Biased锁void lock(Object obj, Thread currentTr){if( obj biased to current

Zz Java对象头部的一些信息和Biased锁
void lock(Object obj, Thread currentTr){ if( obj biased to currentTr) return; if( obj biased to other thread) pause owner thread at safe point change mark word and lock record to pretend that obj is locked by other thread with general lock. else{ //fall to common lock }}void unlock(Object obj, Thread currentTr){ if( obj biased to currentTr) return . else fall to common lock}?? 这个ppt讲得很通俗:Lock Reservation: Java Locks Can Mostly Do Without Atomic Operations

    详细版本的论文可以看这里:www.research.ibm.com/trl/projects/jit/paper/p020-kawachiya.ps优化Biased锁在下面的文章中有详细介绍:Eliminating Synchronization-Related Atomic Operations with Biased Locking and Bulk Rebiasing

热点排行