16 mutext lock/unlocks per query?

Rick Jones raj at cup.hp.com
Wed Dec 5 20:13:36 UTC 2001

Paul A Vixie wrote:
> > Which platforms are considered as having lightweight mutexes?
> bsd is what we had in our hands at the time we did the design.

Sadly, I have no such box in my stable to profile...

> it simply never occurred to us that there would ever be a thread
> implementation without inline functions and without usermode TSI
> before syscall.

I cannot say whether or not the HP-UX pthread mutext calls are
"lightweight" or "heavyweight" and the term TSI is not resonating in my
head, but I do know that under HP-UX, the pthread_mutex_lock and
pthread_mutex_unlock calls will do their thing entirely in user-space
unless there is contention for the mutex. When there is contention, you
may start to see calls to sched_yield() and possibly ksleep and then

The profile should show the syscall stubs for when those things were
called. As I recall, that was rather rare.

rick jones
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...

More information about the bind-workers mailing list