Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2000 21:26:33 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Luoqi Chen <luoqi@watermarkgroup.com>
Cc:        jasone@canonware.com, smp@freebsd.org
Subject:   Re:  SMP meeting summary
Message-ID:  <Pine.BSF.4.21.0006262125550.28246-100000@salmon.nlsystems.com>
In-Reply-To: <200006261646.e5QGkUS06290@lor.watermarkgroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Jun 2000, Luoqi Chen wrote:

> >      Compared with the use of tsleep(), mutexes have a number of
> >      advantages:
> > 
> >      - Each mutex has its own wait (sleep) queue.  When a process releases
> >        a mutex, it automatically schedules the next process waiting on the
> >        queue.  This is more efficient than searching a possibly very long,
> >        linear sleep queue.  It also avoids the flooding when multiple
> >        processes get scheduled, and most of them have to go back to sleep
> >        again.
> > 
> What about processes of different priorities blocking for the same mutex?
> Would you do a linear search on the queue? or have the queue sorted by
> priority? or a FIFO queue is good enough?

The BSD/OS mutex has the queue sorted by priority.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 20 8442 9037




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.BSF.4.21.0006262125550.28246-100000>