Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 7/7/83; site rlgvax.UUCP Path: utzoo!linus!decvax!harpo!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.bugs.4bsd,net.unix-wizards Subject: Re: sleep() Message-ID: <843@rlgvax.UUCP> Date: Sun, 17-Jul-83 22:54:41 EDT Article-I.D.: rlgvax.843 Posted: Sun Jul 17 22:54:41 1983 Date-Received: Mon, 18-Jul-83 10:29:45 EDT References: <2902@cbosg.UUCP>, <832@rlgvax.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 14 In a previous note I mentioned that if several processes are sleeping on a pause(), and one of them gets an alarm(), all of them get woken up. It turns out that the problem is that in vanilla V7 psignal() uses wakeup() to wake the recipient up. This means that if more than one process is in a pause() and sleeping on &u (which is the same address for all processes on most systems), if one process gets signalled out of the sleep all the other processes will wake up. However, on 4.1BSD and System III, it looks like this isn't a problem because on those systems psignal() doesn't use wakeup() to make the target process runnable, but moves the process to the run queue and changes its state directly. We encountered the problem on a V7-based kernel. Guy Harris {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy