sleep()

Guy Harris guy at rlgvax.UUCP
Mon Jul 18 12:54:41 AEST 1983


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



More information about the Comp.unix.wizards mailing list