From owner-freebsd-arch Mon Sep 11 21: 4:57 2000 Delivered-To: freebsd-arch@freebsd.org Received: from berserker.bsdi.com (berserker.twistedbit.com [199.79.183.1]) by hub.freebsd.org (Postfix) with ESMTP id 88E3B37B423 for ; Mon, 11 Sep 2000 21:04:54 -0700 (PDT) Received: from berserker.bsdi.com (cp@[127.0.0.1]) by berserker.bsdi.com (8.9.3/8.9.3) with ESMTP id WAA25503; Mon, 11 Sep 2000 22:04:28 -0600 (MDT) Message-Id: <200009120404.WAA25503@berserker.bsdi.com> To: Jason Evans Cc: Greg Lehey , arch@freebsd.org Subject: Re: Long-term mutex ownership (was Re: Interruptable mutex aquires.) From: Chuck Paterson Date: Mon, 11 Sep 2000 22:04:28 -0600 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG If you hold a mutex across a sleep call then release of the mutex becomes dependent upon another process. This makes it impossible (at least from a practical point of view) to prove that there are not deadlocks. From my experience I was use to mutexs being held across sleep (async event waits) calls. Eric Varsanyi whose background was Cray, rather than Sun, thought we should do without them until they were needed. It turned out that we didn't really need them at all so we decided to go without and not have to fight the dead lock issues. It wasn't as if we could do with out them, it was not an issue at all. Mutex are for protecting data there are other mechanism for doing the other types of synchronization. Chuck } }I don't recall the original argument against holding mutexes for long }periods. From an abstract point of view, there's nothing wrong with such }practice, and in fact it makes sense for many problems. Is there an issue }with our implementation? If so, can someone please explain it? } }Thanks, }Jason } } }To Unsubscribe: send mail to majordomo@FreeBSD.org }with "unsubscribe freebsd-arch" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message