public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fast Userspace Mutexes (futex) vs. msem_*
@ 2002-03-08  6:15 Doug Siebert
  2002-03-08  6:34 ` Davide Libenzi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Doug Siebert @ 2002-03-08  6:15 UTC (permalink / raw)
  To: linux-kernel

I'm a long-time lurker in linux-kernel, but the discussion about fast
userspace mutexes ("futexes") has piqued my interest.  I made great
use of the msem_* (msem_init, msem_lock, msem_unlock) functions on HP-UX
in the mid 90s (HP-UX 9.01 and on)  At the time, they were invaluable for
me, with 1000+ processes needing exclusive access to resources on a 50MHz
machine.  Requiring a system call for this purpose would have been a major
performance hit (remember HP-UX's system calls are not nearly so light
weight as Linux's)

The direction that the futex implementation is going is looking a lot like
how they are implemented on HP-UX (as well as Tru64 and AIX)  I am curious
though why the case of "what happens if the process holding the lock dies"
is considered unimportant by some people.  It wouldn't be all that much
more work to "do it right" (IMHO) and handle this case.  AFAIK, on HP-UX
the implementation kept a "locker id" and a linked list of waiters' lock
ids (to allow first come first served as well as handling the case of a
lock holder dying)  There was an underlying system call that was made when
the userspace part in libc found the lock already held and waiting for the
lock was desired.

If the implementation does move further towards the msem_* standard, it
might make sense to just implement it as defined, and provide source
compatibility with existing applications on HP-UX, AIX, and Tru64 that
use it.

I'm not subscribed (I skim the hypermail archives on zork a couple times
a week, so please cc: me on comments for a faster response)

-- 
Douglas Siebert
douglas-siebert@uiowa.edu

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-03-12 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-08  6:15 Fast Userspace Mutexes (futex) vs. msem_* Doug Siebert
2002-03-08  6:34 ` Davide Libenzi
2002-03-08 22:04 ` Edgar Toernig
2002-03-12 16:50   ` Bill Davidsen
2002-03-09  4:23 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox