Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Aug 2000 14:49:34 -0700
From:      David Greenman <dg@root.com>
To:        Paul Richards <paul@originative.co.uk>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, Alfred Perlstein <bright@wintelcom.net>, Matt Dillon <dillon@earth.backplane.com>, Mike Smith <msmith@FreeBSD.ORG>, Stephen McKay <mckay@thehub.com.au>, freebsd-current@FreeBSD.ORG, dillon@FreeBSD.ORG
Subject:   Re: Ugly, slow shutdown 
Message-ID:  <200008072149.OAA04253@implode.root.com>
In-Reply-To: Your message of "Mon, 07 Aug 2000 22:56:25 BST." <398F3089.416DEA1@originative.co.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
>In the particular case of sleeping though, a woken process does need to
>check the condition that it slept on because one of the other processes
>sleeping on that resource may have had a chance to run first and changed
>some state. So as a general rule, you shouldn't assume that everything
>is fine when you return from being asleep because it might not be.

   No, that's not true, and there are many examples in the kernel where a
bogus wakeup would lead to bad things happening. I recall some code in the
advisory locking code, and VM system, that assume that there is only one
wakeup event and that the thing causing it assures that certain other
things have occured before issuing it. That's just the way it has worked
since the dawn of time.

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
Manufacturer of high-performance Internet servers - http://www.terasolutions.com
Pave the road of life with opportunities.


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




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