Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jul 2000 22:36:14 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Joe Eykholt <jre@iprg.nokia.com>
Cc:        Greg Lehey <grog@lemis.com>, "Jeroen C. van Gelderen" <jeroen@vangelderen.org>, Jason Evans <jasone@canonware.com>, Luoqi Chen <luoqi@watermarkgroup.com>, smp@FreeBSD.ORG
Subject:   Re: SMP meeting summary
Message-ID:  <Pine.SUN.3.91.1000703223119.29911B-100000@pcnet1.pcnet.com>
In-Reply-To: <39612626.3E3AE2C4@iprg.nokia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 3 Jul 2000, Joe Eykholt wrote:
> Greg Lehey wrote:
>  
> > There's nothing to say that wake_one is more complex.  wake_one takes
> > the first process on the mutex's sleep list and wakes it.  wake_all
> > (or whatever) would make a loop out of that wake function and wake all
> > the processes on the list.  All would then be scheduled, try to take
> > the mutex, and all except one would fail and be put back on the sleep
> > list.  Does this make sense?
> 
> With adaptive mutexes, the threads which are woken will either run one 
> serially on one CPU, or some run at the same time on multiple CPUs.  
> In that case, one gets the lock right away, and the rest SPIN on it 
> (as long as the new owner doesn't get suspended on something else).  
> They don't necessarily go back to sleep on that same lock.

Thanks, I forgot about this.  Even if you wake multiple threads, they
will not be put back to sleep until the owner of the mutex is no
longer running.

-- 
Dan Eischen



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1000703223119.29911B-100000>