Date: Mon, 26 Jun 2000 14:49:57 -0700 From: Jason Evans <jasone@canonware.com> To: Luoqi Chen <luoqi@watermarkgroup.com> Cc: smp@FreeBSD.ORG Subject: Re: SMP meeting summary Message-ID: <20000626144957.J8965@blitz.canonware.com> In-Reply-To: <200006262013.e5QKDOP09679@lor.watermarkgroup.com>; from luoqi@watermarkgroup.com on Mon, Jun 26, 2000 at 04:13:24PM -0400 References: <200006262013.e5QKDOP09679@lor.watermarkgroup.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 26, 2000 at 04:13:24PM -0400, Luoqi Chen wrote: > > Processes that block on a mutex are granted the lock in FIFO order, rather > > than priority order. In order to avoid priority inversion, the mutex wait > > queue implements priority lending. > > > Ok. I remember I have read somewhere that solaris 7 has given up the behavior > of waking up only one thread after a mutex is released, now it wakes up all > the blocking threads. It seems that the "thundering herd" problem is not > serious after all if the lock granuity is high enough. I don't think this is the case. Solaris uses what are called turnstiles to implement priority lending. For a reasonably detailed explanation, see: http://www.sunworld.com/sunworldonline/swol-08-1999/swol-08-insidesolaris.html My reading of this article is that turnstiles use priority lending to boost the current owner(s) of a lock, but that subsequent lock granting is done in priority order. This lock granting behavior isn't strictly necessary, but it may have desireable characteristics. I haven't looked at the BSD/OS code in detail yet, but according to Doug Rabson, it behaves in basically the same way. Also, there is a book due out within the next several weeks that contains a lot of good information about the Solaris kernel: Solaris Internals: Architecture and Techniques Vol. 1 Core Kernel Components by Jim Mauro, Richard McDougall ISBN: 0-13-022496-0 Jason 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?20000626144957.J8965>