Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2000 22:04:28 -0600
From:      Chuck Paterson <cp@bsdi.com>
To:        Jason Evans <jasone@canonware.com>
Cc:        Greg Lehey <grog@lemis.com>, arch@freebsd.org
Subject:   Re: Long-term mutex ownership (was Re: Interruptable mutex aquires.) 
Message-ID:  <200009120404.WAA25503@berserker.bsdi.com>

next in thread | raw e-mail | index | archive | help

	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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009120404.WAA25503>