From owner-freebsd-arch  Mon Sep 11 23:49:54 2000
Delivered-To: freebsd-arch@freebsd.org
Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80])
	by hub.freebsd.org (Postfix) with ESMTP
	id BF00E37B424; Mon, 11 Sep 2000 23:49:50 -0700 (PDT)
Received: (from grog@localhost)
	by wantadilla.lemis.com (8.11.0/8.9.3) id e8C6nT624128;
	Tue, 12 Sep 2000 16:19:29 +0930 (CST)
	(envelope-from grog)
Date: Tue, 12 Sep 2000 16:19:29 +0930
From: Greg Lehey <grog@lemis.com>
To: Matthew Jacob <mjacob@feral.com>
Cc: Joerg Micheel <joerg@cs.waikato.ac.nz>,
	Frank Mayhar <frank@exit.com>, John Baldwin <jhb@pike.osd.bsdi.com>,
	Mark Murray <markm@FreeBSD.ORG>, FreeBSD-arch@FreeBSD.ORG
Subject: Re: cvs commit: src/sys/conf files src/sys/sys random.h src/sys/dev/randomdev hash.c hash.h harvest.c randomdev.c yarrow.c yarro
Message-ID: <20000912161928.C23948@wantadilla.lemis.com>
References: <20000912145255.A41113@cs.waikato.ac.nz> <Pine.BSF.4.21.0009112334310.70549-100000@beppo.feral.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 1.0i
In-Reply-To: <Pine.BSF.4.21.0009112334310.70549-100000@beppo.feral.com>; from mjacob@feral.com on Mon, Sep 11, 2000 at 11:34:55PM -0700
Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia
Phone: +61-8-8388-8286
Fax: +61-8-8388-8725
Mobile: +61-418-838-708
WWW-Home-Page: http://www.lemis.com/~grog
X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF  13 24 52 F8 6D A4 95 EF
Sender: owner-freebsd-arch@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG

On Monday, 11 September 2000 at 23:34:55 -0700, Matt Jacob wrote:
>>> At Tandem, we used semaphores exclusively (well, we had a mutex
>>> instruction, but it was really interrupt lockout).  As far as I can
>>> recall, the semaphore counter was always 1, so the effect was
>>> identical to the current blocking "mutexes".
>>
>> I liked the model Sun chose for Solaris. They have mutex', rw_locks,
>> condition variables. I don't like semaphores. Mutexes are for short
>> locks. Condition variables are for long-term waits, they are associated
>> with a mutex. You can only sleep/wakeup a CV when holding the associated
>> with it, which prevents races. When having to sleep on a CV the kernel
>> would unlock the mutex and reaquire it for the running thread before
>> returning.
>
> It encouraged very sloppy programming.

That begs the question "can you elaborate?".

Greg
--
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers


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