Current Status
Jon Olson
olson@mmsi.com
Thu Feb 18 12:52:00 GMT 1999
On 1999年2月18日, Godmar Back wrote:
>>Apropos sync_info. EF has gone public since the last discussion on this
>topic on this list. While I don't have hard numbers, I think that their
>way of doing synchronization is the best I've seen so far.
>>The basic idea is that they spent an additional word per object, but
>unlike gcj/kaffe, they spend 30 bits of it to store an object's hashcode
>(Kaffe uses the address of an object, which doesn't work with a moving
>collector - what does gcj/libjava do?), and they spend 2 bits to indicate
>that an object is locked/that the lock is contended. This optimizes
>the common case of taking an uncontended lock.
>> - Godmar
Hmm.... I'd be interested in seeing an implementation of this synchronization
strategy. I suppose that the only time it would allocate a synchronization
object is in the case an object is already locked. Off the top of my head, I
can't see how to easily know if I already own the monitor with just a
single bit to indicate that an object is locked. Maybe I'm just dense right
now...
--
Jon Olson, Modular Mining Systems
3289 E. Hemisphere Loop
Tucson, AZ 85706
INTERNET: olson@mmsi.com
PHONE: (520)746-9127
FAX: (520)889-5790
More information about the Java
mailing list