First-in-last-out waiting quere for lock in Kaffe

Patrick Tullmann tullmann at cs.utah.edu
Sun Oct 22 20:47:15 PDT 2000


> I noticed that in kaffe lock implementation (in slowLockMutex() 
> and slowUnlockMutex() ), the last thread suspending on the lock 
> will always be resumed firstly, which doesn't embody equality
> policy. Right?

It is not the fairest policy.  However, the JLS does not require a
fair locking policy, and this is simpler/faster.  Additionally, this
policy in Kaffe quickly exposes livelock problems in your code.  :)

(I asked the exact same question a couple of months ago...).

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann at cs.utah.edu
	   "I'd kill for a Nobel Peace Prize." -- S. Wright


More information about the kaffe mailing list